On Fri, Feb 10, 2012 at 04:28:19PM +0100, Werner Fink wrote:
> On Fri, Feb 10, 2012 at 09:07:19AM -0500, Glenn Fowler wrote:
> > 
> > pty is an ast command, functionality similar to expect but no reliance on 
> > tcl
> > (I have not used expect directly)
> > its in the { ast-base ast-open } packages
> > man page online
> > pty is how we implemented the posix "User Portability Utilities Option" 
> > tests for ksh
> > see src/cmd/ksh93/tests/pty.sh
> 
> Indeed I've added from ast-base.2012-02-02.tgz the src/lib/libuu/ and
> src/cmd/builtin/ to the build tree and the pty command works. I'm
> now going to add some of those builtin command to future ksh packages
> for future releases.

Just a bug as in src/cmd/builtin/what.c line 133 and line 141
a `s[3]' is touched.

     Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
--- src/cmd/builtin/what.c
+++ src/cmd/builtin/what.c	2012-02-10 17:06:06.262433626 +0000
@@ -68,7 +68,7 @@ static struct
 	int		match;
 	int		single;
 	size_t		skip[UCHAR_MAX+1];
-	unsigned char	prev[3];
+	unsigned char	prev[4];
 } state;
 
 static void
@@ -99,7 +99,7 @@ what(const char* file, Sfio_t* ip, Sfio_
 			{
 			next:
 				s = state.prev;
-				s[0] = s[1] = s[2] = 0;
+				s[0] = s[1] = s[2] = s[3] = 0;
 				switch (mid)
 				{
 				default:
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to