aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/window
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2000-10-30 10:14:24 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2000-10-30 10:14:24 +0000
commitbc213414f0377767610468bd8cea4517d05c8643 (patch)
tree975753be56c85dffe7a804cdd45011576fcc7ba0 /usr.bin/window
parent237167e2a26a7b99333eb79b57a543bafd2bbb11 (diff)
Notes
Diffstat (limited to 'usr.bin/window')
-rw-r--r--usr.bin/window/Makefile2
-rw-r--r--usr.bin/window/cmd3.c3
-rw-r--r--usr.bin/window/cmd6.c5
-rw-r--r--usr.bin/window/cmd7.c3
-rw-r--r--usr.bin/window/context.c3
-rw-r--r--usr.bin/window/lcmd1.c3
-rw-r--r--usr.bin/window/lcmd2.c3
-rw-r--r--usr.bin/window/main.c3
-rw-r--r--usr.bin/window/parser.h3
-rw-r--r--usr.bin/window/string.c9
-rw-r--r--usr.bin/window/string.h65
-rw-r--r--usr.bin/window/var.c3
12 files changed, 26 insertions, 79 deletions
diff --git a/usr.bin/window/Makefile b/usr.bin/window/Makefile
index fba358747c6a..700cb3de2e9e 100644
--- a/usr.bin/window/Makefile
+++ b/usr.bin/window/Makefile
@@ -1,4 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
+# $FreeBSD$
PROG= window
SRCS= char.c cmd.c cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c cmd7.c \
@@ -15,6 +16,7 @@ SRCS= char.c cmd.c cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c cmd7.c \
wwterminfo.c wwtty.c wwunframe.c wwupdate.c wwwrite.c xx.c xxflush.c \
compress.c
MAN= window.1
+
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
diff --git a/usr.bin/window/cmd3.c b/usr.bin/window/cmd3.c
index 950ddf626fdf..b74b52f99396 100644
--- a/usr.bin/window/cmd3.c
+++ b/usr.bin/window/cmd3.c
@@ -36,10 +36,11 @@
#ifndef lint
static char sccsid[] = "@(#)cmd3.c 8.1 (Berkeley) 6/6/93";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include "defs.h"
-#include "string.h"
+#include "mystring.h"
setescape(esc)
register char *esc;
diff --git a/usr.bin/window/cmd6.c b/usr.bin/window/cmd6.c
index fc8548545fad..ac3d472c98d1 100644
--- a/usr.bin/window/cmd6.c
+++ b/usr.bin/window/cmd6.c
@@ -36,10 +36,11 @@
#ifndef lint
static char sccsid[] = "@(#)cmd6.c 8.1 (Berkeley) 6/6/93";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include "defs.h"
-#include "string.h"
+#include "mystring.h"
#include "char.h"
/*
@@ -87,7 +88,7 @@ c_debug()
debug_str()
{
register struct ww *w;
- struct string *s;
+ struct mystring *s;
if ((w = openiwin(wwnrow - 3, "Allocated Strings")) == 0) {
error("Can't open string window: %s.", wwerror());
diff --git a/usr.bin/window/cmd7.c b/usr.bin/window/cmd7.c
index c6324ff6dacb..25c3ff03b510 100644
--- a/usr.bin/window/cmd7.c
+++ b/usr.bin/window/cmd7.c
@@ -36,11 +36,12 @@
#ifndef lint
static char sccsid[] = "@(#)cmd7.c 8.1 (Berkeley) 6/6/93";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include <stdlib.h>
#include "defs.h"
-#include "string.h"
+#include "mystring.h"
/*
* Window size.
diff --git a/usr.bin/window/context.c b/usr.bin/window/context.c
index cd43cdb8875d..e568a0cf78ce 100644
--- a/usr.bin/window/context.c
+++ b/usr.bin/window/context.c
@@ -36,10 +36,11 @@
#ifndef lint
static char sccsid[] = "@(#)context.c 8.1 (Berkeley) 6/6/93";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include "value.h"
-#include "string.h"
+#include "mystring.h"
#include "context.h"
#include <fcntl.h>
diff --git a/usr.bin/window/lcmd1.c b/usr.bin/window/lcmd1.c
index cafe72c84d94..cc7c5303d7a1 100644
--- a/usr.bin/window/lcmd1.c
+++ b/usr.bin/window/lcmd1.c
@@ -36,11 +36,12 @@
#ifndef lint
static char sccsid[] = "@(#)lcmd1.c 8.1 (Berkeley) 6/6/93";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include "defs.h"
#include <string.h> /* System string definitions. */
-#include "string.h" /* Local string definitions. */
+#include "mystring.h" /* Local string definitions. */
#include "value.h"
#include "lcmd.h"
#include "var.h"
diff --git a/usr.bin/window/lcmd2.c b/usr.bin/window/lcmd2.c
index 6d9b0f274adb..7200f6039e54 100644
--- a/usr.bin/window/lcmd2.c
+++ b/usr.bin/window/lcmd2.c
@@ -36,11 +36,12 @@
#ifndef lint
static char sccsid[] = "@(#)lcmd2.c 8.1 (Berkeley) 6/6/93";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include "defs.h"
#include <string.h> /* System string definitions. */
-#include "string.h" /* Local string definitions. */
+#include "mystring.h" /* Local string definitions. */
#include "value.h"
#include "var.h"
#include "lcmd.h"
diff --git a/usr.bin/window/main.c b/usr.bin/window/main.c
index fb80ba3937e3..6d8a2d5816d7 100644
--- a/usr.bin/window/main.c
+++ b/usr.bin/window/main.c
@@ -42,6 +42,7 @@ char copyright[] =
#ifndef lint
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/2/94";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include "defs.h"
@@ -49,7 +50,7 @@ static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/2/94";
#include <locale.h>
#include <stdio.h>
#include <string.h> /* System string definitions. */
-#include "string.h" /* Local string definitions. */
+#include "mystring.h" /* Local string definitions. */
#include "char.h"
#include "local.h"
diff --git a/usr.bin/window/parser.h b/usr.bin/window/parser.h
index 747ae4b4f5f4..30a45037c483 100644
--- a/usr.bin/window/parser.h
+++ b/usr.bin/window/parser.h
@@ -34,12 +34,13 @@
* SUCH DAMAGE.
*
* @(#)parser.h 8.1 (Berkeley) 6/6/93
+ * $FreeBSD$
*/
#include "value.h"
#include "context.h"
#include "token.h"
-#include "string.h"
+#include "mystring.h"
#define p_erred() (cx.x_erred)
#define p_synerred() (cx.x_synerred)
diff --git a/usr.bin/window/string.c b/usr.bin/window/string.c
index 9d1c1458f2a9..29e3287f5695 100644
--- a/usr.bin/window/string.c
+++ b/usr.bin/window/string.c
@@ -36,10 +36,11 @@
#ifndef lint
static char sccsid[] = "@(#)string.c 8.1 (Berkeley) 6/6/93";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include <string.h> /* System string definitions. */
-#include "string.h" /* Local string definitions. */
+#include "mystring.h" /* Local string definitions. */
char *malloc();
@@ -123,9 +124,9 @@ char *
str_alloc(l)
int l;
{
- register struct string *s;
+ register struct mystring *s;
- s = (struct string *) malloc((unsigned)l + str_offset);
+ s = (struct mystring *) malloc((unsigned)l + str_offset);
if (s == 0)
return 0;
if (str_head.s_forw == 0)
@@ -140,7 +141,7 @@ int l;
str_free(str)
char *str;
{
- register struct string *s;
+ register struct mystring *s;
for (s = str_head.s_forw; s != &str_head && s->s_data != str;
s = s->s_forw)
diff --git a/usr.bin/window/string.h b/usr.bin/window/string.h
deleted file mode 100644
index 08cae5677b63..000000000000
--- a/usr.bin/window/string.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Edward Wang at The University of California, Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)string.h 8.1 (Berkeley) 6/6/93
- */
-
-#define STR_DEBUG
-
-char *str_cpy();
-char *str_ncpy();
-char *str_cat();
-char *str_itoa();
-
-#define str_cmp(a, b) strcmp(a, b)
-
-#ifdef STR_DEBUG
-struct string {
- struct string *s_forw;
- struct string *s_back;
- char s_data[1];
-};
-
-struct string str_head;
-
-#define str_offset ((unsigned)str_head.s_data - (unsigned)&str_head)
-#define str_stos(s) ((struct string *)((unsigned)(s) - str_offset))
-
-char *str_alloc();
-int str_free();
-#else
-#define str_free(s) free(s)
-#define str_alloc(s) malloc(s)
-#endif
diff --git a/usr.bin/window/var.c b/usr.bin/window/var.c
index 1deb402e7c43..b2a894e46298 100644
--- a/usr.bin/window/var.c
+++ b/usr.bin/window/var.c
@@ -36,11 +36,12 @@
#ifndef lint
static char sccsid[] = "@(#)var.c 8.1 (Berkeley) 6/6/93";
+static char rcsid[] = "@(#)$FreeBSD$";
#endif /* not lint */
#include "value.h"
#include "var.h"
-#include "string.h"
+#include "mystring.h"
char *malloc();