Deleted Added
full compact
wrterm.c (216370) wrterm.c (229403)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31
32__FBSDID("$FreeBSD: head/usr.bin/tset/wrterm.c 216370 2010-12-11 08:32:16Z joel $");
32__FBSDID("$FreeBSD: head/usr.bin/tset/wrterm.c 229403 2012-01-03 18:51:58Z ed $");
33
34#ifndef lint
35static const char sccsid[] = "@(#)wrterm.c 8.1 (Berkeley) 6/9/93";
36#endif
37
38#include <sys/types.h>
39
40#include <ctype.h>

--- 10 unchanged lines hidden (view full) ---

51void
52wrtermcap(char *bp)
53{
54 register int ch;
55 register char *p;
56 char *t, *sep;
57
58 /* Find the end of the terminal names. */
33
34#ifndef lint
35static const char sccsid[] = "@(#)wrterm.c 8.1 (Berkeley) 6/9/93";
36#endif
37
38#include <sys/types.h>
39
40#include <ctype.h>

--- 10 unchanged lines hidden (view full) ---

51void
52wrtermcap(char *bp)
53{
54 register int ch;
55 register char *p;
56 char *t, *sep;
57
58 /* Find the end of the terminal names. */
59 if ((t = index(bp, ':')) == NULL)
59 if ((t = strchr(bp, ':')) == NULL)
60 errx(1, "termcap names not colon terminated");
61 *t++ = '\0';
62
63 /* Output terminal names that don't have whitespace. */
64 sep = strdup("");
65 while ((p = strsep(&bp, "|")) != NULL)
66 if (*p != '\0' && strpbrk(p, " \t") == NULL) {
67 (void)printf("%s%s", sep, p);

--- 47 unchanged lines hidden ---
60 errx(1, "termcap names not colon terminated");
61 *t++ = '\0';
62
63 /* Output terminal names that don't have whitespace. */
64 sep = strdup("");
65 while ((p = strsep(&bp, "|")) != NULL)
66 if (*p != '\0' && strpbrk(p, " \t") == NULL) {
67 (void)printf("%s%s", sep, p);

--- 47 unchanged lines hidden ---