[Midnightbsd-cvs] src [11270] trunk/usr.bin/tset: sync tset with freebsd

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Jul 3 19:59:39 EDT 2018


Revision: 11270
          http://svnweb.midnightbsd.org/src/?rev=11270
Author:   laffer1
Date:     2018-07-03 19:59:39 -0400 (Tue, 03 Jul 2018)
Log Message:
-----------
sync tset with freebsd

Modified Paths:
--------------
    trunk/usr.bin/tset/Makefile
    trunk/usr.bin/tset/extern.h
    trunk/usr.bin/tset/map.c
    trunk/usr.bin/tset/misc.c
    trunk/usr.bin/tset/set.c
    trunk/usr.bin/tset/term.c
    trunk/usr.bin/tset/tset.1
    trunk/usr.bin/tset/tset.c
    trunk/usr.bin/tset/wrterm.c

Property Changed:
----------------
    trunk/usr.bin/tset/tset.1

Modified: trunk/usr.bin/tset/Makefile
===================================================================
--- trunk/usr.bin/tset/Makefile	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/Makefile	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+# $MidnightBSD$
 #	@(#)Makefile	8.1 (Berkeley) 6/9/93
 
 PROG=	tset

Modified: trunk/usr.bin/tset/extern.h
===================================================================
--- trunk/usr.bin/tset/extern.h	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/extern.h	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -27,12 +28,15 @@
  * SUCH DAMAGE.
  *
  *	@(#)extern.h	8.1 (Berkeley) 6/9/93
- *	$MidnightBSD$
+ *	$FreeBSD: stable/10/usr.bin/tset/extern.h 241737 2012-10-19 14:49:42Z ed $
  */
 
+#include <termios.h>
+
 extern struct termios mode, oldmode;
 extern int Columns, isreset, Lines;
 extern int erasech, intrchar, killch;
+extern speed_t Ospeed;
 
 void	 add_mapping(const char *, char *);
 void	 cat(char *);

Modified: trunk/usr.bin/tset/map.c
===================================================================
--- trunk/usr.bin/tset/map.c	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/map.c	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/tset/map.c 241737 2012-10-19 14:49:42Z ed $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)map.c	8.1 (Berkeley) 6/9/93";
@@ -44,8 +45,7 @@
 
 #include "extern.h"
 
-extern speed_t Ospeed;
-speed_t	tset_baudrate(char *);
+static speed_t tset_baudrate(char *);
 
 /* Baud rate conditionals for mapping. */
 #define	GT		0x01
@@ -63,7 +63,7 @@
 	speed_t	speed;		/* Baud	rate to	compare	against. */
 } MAP;
 
-MAP *cur, *maplist;
+static MAP *cur, *maplist;
 
 /*
  * Syntax for -m:
@@ -132,7 +132,7 @@
 			goto badmopt;
 		++arg;
 	} else {				/* Optional baudrate. */
-		arg = index(p = arg, ':');
+		arg = strchr(p = arg, ':');
 		if (arg == NULL)
 			goto badmopt;
 		*arg++ = '\0';
@@ -224,7 +224,7 @@
 	speed_t	speed;
 } SPEEDS;
 
-SPEEDS speeds[] = {
+static SPEEDS speeds[] = {
 	{ "0",		B0 },
 	{ "134.5",	B134 },
 	{ "exta",	B19200 },
@@ -232,7 +232,7 @@
 	{ NULL, 0 }
 };
 
-speed_t
+static speed_t
 tset_baudrate(char *rate)
 {
 	SPEEDS *sp;

Modified: trunk/usr.bin/tset/misc.c
===================================================================
--- trunk/usr.bin/tset/misc.c	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/misc.c	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/tset/misc.c 216370 2010-12-11 08:32:16Z joel $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)misc.c	8.1 (Berkeley) 6/9/93";

Modified: trunk/usr.bin/tset/set.c
===================================================================
--- trunk/usr.bin/tset/set.c	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/set.c	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/tset/set.c 216370 2010-12-11 08:32:16Z joel $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)set.c	8.2 (Berkeley) 2/28/94";

Modified: trunk/usr.bin/tset/term.c
===================================================================
--- trunk/usr.bin/tset/term.c	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/term.c	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/tset/term.c 241737 2012-10-19 14:49:42Z ed $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)term.c	8.1 (Berkeley) 6/9/93";
@@ -46,7 +47,7 @@
 #include <ttyent.h>
 #include "extern.h"
 
-char    tbuf[1024];      		/* Termcap entry. */
+static char tbuf[1024];		/* Termcap entry. */
 
 const char *askuser(const char *);
 char	*ttys(char *);
@@ -74,7 +75,7 @@
 
 	/* Try ttyname(3); check for dialup or other mapping. */
 	if ((ttypath = ttyname(STDERR_FILENO))) {
-		if ((p = rindex(ttypath, '/')))
+		if ((p = strrchr(ttypath, '/')))
 			++p;
 		else
 			p = ttypath;
@@ -146,7 +147,7 @@
 			return (dflt);
 		}
 
-		if ((p = index(answer, '\n')))
+		if ((p = strchr(answer, '\n')))
 			*p = '\0';
 		if (answer[0])
 			return (answer);

Modified: trunk/usr.bin/tset/tset.1
===================================================================
--- trunk/usr.bin/tset/tset.1	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/tset.1	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
 .\" Copyright (c) 1985, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -26,7 +27,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)tset.1	8.1 (Berkeley) 6/9/93
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.bin/tset/tset.1 216370 2010-12-11 08:32:16Z joel $
 .\"
 .Dd June 9, 1993
 .Dt TSET 1


Property changes on: trunk/usr.bin/tset/tset.1
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.bin/tset/tset.c
===================================================================
--- trunk/usr.bin/tset/tset.c	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/tset.c	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1980, 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/tset/tset.c 216370 2010-12-11 08:32:16Z joel $");
 
 #ifndef lint
 static const char copyright[] =

Modified: trunk/usr.bin/tset/wrterm.c
===================================================================
--- trunk/usr.bin/tset/wrterm.c	2018-07-03 23:58:48 UTC (rev 11269)
+++ trunk/usr.bin/tset/wrterm.c	2018-07-03 23:59:39 UTC (rev 11270)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -29,7 +30,7 @@
 
 #include <sys/cdefs.h>
 
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/usr.bin/tset/wrterm.c 229403 2012-01-03 18:51:58Z ed $");
 
 #ifndef lint
 static const char sccsid[] = "@(#)wrterm.c	8.1 (Berkeley) 6/9/93";
@@ -56,7 +57,7 @@
 	char *t, *sep;
 
 	/* Find the end of the terminal names. */
-	if ((t = index(bp, ':')) == NULL)
+	if ((t = strchr(bp, ':')) == NULL)
 		errx(1, "termcap names not colon terminated");
 	*t++ = '\0';
 



More information about the Midnightbsd-cvs mailing list