mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
script: Correct -F in man page and usage string.
Sponsored by: Klara, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D37138 (cherry picked from commit8e096e24d4) script: Add usage string for playback mode. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37138 (cherry picked from commite7c13cf438) script: Use size_t / ssize_t where needed. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37177 (cherry picked from commit3276866f40) script: Further usage string nits. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37177 (cherry picked from commit6ac087cf8f) script: Handle a missing 's' stamp gracefully. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37182 (cherry picked from commit473e9fcab4)
This commit is contained in:
1 parent
9ba17e2d1c
commit
7a254e64bf
2 files changed
+11
-8
No files matched your search
@@ -28,7 +28,7 @@
|
||||
.\" @(#)script.1 8.1 (Berkeley) 6/6/93
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd March 9, 2022
|
||||
.Dd October 26, 2022
|
||||
.Dt SCRIPT 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -36,8 +36,7 @@
|
||||
.Nd make typescript of terminal session
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl aefkqr
|
||||
.Op Fl F Ar pipe
|
||||
.Op Fl aeFfkqr
|
||||
.Op Fl t Ar time
|
||||
.Op Ar file Op Ar command ...
|
||||
.Nm
|
||||
@@ -88,7 +87,7 @@ Accepted for compatibility with
|
||||
.Nm .
|
||||
The child command exit status is always the exit status of
|
||||
.Nm .
|
||||
.It Fl F Ar pipe
|
||||
.It Fl F
|
||||
Immediately flush output after each write.
|
||||
This will allow a user to create a named pipe using
|
||||
.Xr mkfifo 1
|
||||
|
||||
@@ -73,8 +73,8 @@ struct stamp {
|
||||
|
||||
struct buf_elm {
|
||||
TAILQ_ENTRY(buf_elm) link;
|
||||
int rpos;
|
||||
int len;
|
||||
size_t rpos;
|
||||
size_t len;
|
||||
char ibuf[];
|
||||
};
|
||||
|
||||
@@ -107,7 +107,6 @@ static void usage(void);
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int cc;
|
||||
struct termios rtt, stt;
|
||||
struct winsize win;
|
||||
struct timeval tv, *tvp;
|
||||
@@ -116,6 +115,7 @@ main(int argc, char *argv[])
|
||||
char ibuf[BUFSIZ];
|
||||
fd_set rfd, wfd;
|
||||
struct buf_elm *be;
|
||||
ssize_t cc;
|
||||
int aflg, Fflg, kflg, pflg, ch, k, n, fcm;
|
||||
int flushtime, readstdin;
|
||||
int fm_fd, fm_log;
|
||||
@@ -366,7 +366,9 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
(void)fprintf(stderr,
|
||||
"usage: script [-adfkpqr] [-t time] [file [command ...]]\n");
|
||||
"usage: script [-aeFfkpqr] [-t time] [file [command ...]]\n");
|
||||
(void)fprintf(stderr,
|
||||
" script -p [-deq] [-T fmt] [file]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -550,6 +552,8 @@ playback(FILE *fp)
|
||||
tclock = stamp.scr_sec;
|
||||
tso.tv_sec = stamp.scr_sec;
|
||||
tso.tv_nsec = stamp.scr_usec * 1000;
|
||||
if (nread == 0)
|
||||
tsi = tso;
|
||||
|
||||
switch (stamp.scr_direction) {
|
||||
case 's':
|
||||
|
||||
Reference in new issue
Block a user