diff -Nurpd ttyrec-1.0.6-orig/Makefile ttyrec-1.0.6/Makefile --- ttyrec-1.0.6-orig/Makefile 2002-10-22 12:01:23.000000000 +0200 +++ ttyrec-1.0.6/Makefile 2004-10-13 12:35:18.088649600 +0200 @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -O2 +CFLAGS = -O3 -DHAVE_openpty VERSION = 1.0.6 TARGET = ttyrec ttyplay ttytime @@ -19,7 +19,7 @@ ttytime: ttytime.o io.o $(CC) $(CFLAGS) -o ttytime ttytime.o io.o clean: - rm -f *.o $(TARGET) ttyrecord *~ + rm -f *.o $(TARGET) ttyrecord *~ *.exe dist: rm -rf ttyrec-$(VERSION) diff -Nurpd ttyrec-1.0.6-orig/ttyrec.c ttyrec-1.0.6/ttyrec.c --- ttyrec-1.0.6-orig/ttyrec.c 2002-10-22 12:01:23.000000000 +0200 +++ ttyrec-1.0.6/ttyrec.c 2004-10-13 12:35:54.611166400 +0200 @@ -69,10 +69,22 @@ #define _(FOO) FOO -#ifdef HAVE_openpty +#if defined(HAVE_openpty) && !defined(__CYGWIN__) #include #endif +#ifndef HAVE_CFMAKERAW +# undef cfmakeraw +int cfmakeraw(struct termios *termios_p) { + termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + termios_p->c_oflag &= ~OPOST; + termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + termios_p->c_cflag &= ~(CSIZE|PARENB); + termios_p->c_cflag |= CS8; + return 1; +} +#endif + #if defined(SVR4) && !defined(CDEL) #if defined(_POSIX_VDISABLE) #define CDEL _POSIX_VDISABLE @@ -239,8 +251,8 @@ check_line (const char *line) } else { int dummy; char dummy2[BUFSIZ]; if (sscanf(line, "begin %o %s", &dummy, dummy2) == 2) { - /* - * uuencode line found! + /* + * uuencode line found! */ uudecode = popen("uudecode", "w"); fprintf(uudecode, "%s", line); @@ -328,7 +340,7 @@ doshell(const char* command) if (!command) { execl(shell, strrchr(shell, '/') + 1, "-i", 0); } else { - execl(shell, strrchr(shell, '/') + 1, "-c", command, 0); + execl(shell, strrchr(shell, '/') + 1, "-c", command, 0); } perror(shell); fail(); @@ -422,7 +434,7 @@ getmaster() *tp = 'p'; if (ok) { (void) tcgetattr(0, &tt); - (void) ioctl(0, TIOCGWINSZ, + (void) ioctl(0, TIOCGWINSZ, (char *)&win); return; } @@ -476,6 +488,6 @@ getslave() (void) ioctl(slave, TIOCSWINSZ, (char *)&win); #endif (void) setsid(); - (void) ioctl(slave, TIOCSCTTY, 0); + (void) ioctl(slave, O_NOCTTY, 0); #endif /* SVR4 */ }