summaryrefslogtreecommitdiffstats
path: root/usr.bin/window
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-10-26 10:00:52 +0000
committerobrien <obrien@FreeBSD.org>2000-10-26 10:00:52 +0000
commit82cfc38d6c3b6c3fc2f69fa905662dd200648130 (patch)
tree29effa9d6714a6b6f94ac4eaed75086c57aa3634 /usr.bin/window
parentec817875345826d65474ba3a3d504110e8c6fbc0 (diff)
downloadFreeBSD-src-82cfc38d6c3b6c3fc2f69fa905662dd200648130.zip
FreeBSD-src-82cfc38d6c3b6c3fc2f69fa905662dd200648130.tar.gz
Having a local `string.h' is just asking for trouble. As is having a
`struct string'. Rename the struct and effectively rename the header to `mystring.h'
Diffstat (limited to 'usr.bin/window')
-rw-r--r--usr.bin/window/Makefile10
-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/mystring.h11
-rw-r--r--usr.bin/window/parser.h3
-rw-r--r--usr.bin/window/string.c9
-rw-r--r--usr.bin/window/string.h11
-rw-r--r--usr.bin/window/var.c3
13 files changed, 46 insertions, 24 deletions
diff --git a/usr.bin/window/Makefile b/usr.bin/window/Makefile
index fba3587..e1654a6 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 \
@@ -14,8 +15,17 @@ SRCS= char.c cmd.c cmd1.c cmd2.c cmd3.c cmd4.c cmd5.c cmd6.c cmd7.c \
wwredrawwin.c wwrint.c wwscroll.c wwsize.c wwspawn.c wwsuspend.c \
wwterminfo.c wwtty.c wwunframe.c wwupdate.c wwwrite.c xx.c xxflush.c \
compress.c
+SRCS+= mystring.h
MAN= window.1
+
+CFLAGS+= -I.
+
DPADD= ${LIBTERMCAP}
LDADD= -ltermcap
+mystring.h: string.h
+ ln -sf ${.ALLSRC} ${.TARGET}
+
+CLEANFILES+= mystring.h
+
.include <bsd.prog.mk>
diff --git a/usr.bin/window/cmd3.c b/usr.bin/window/cmd3.c
index 950ddf6..b74b52f 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 fc85485..ac3d472 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 c6324ff..25c3ff0 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 cd43cdb..e568a0c 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 cafe72c..cc7c530 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 6d9b0f2..7200f60 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 fb80ba3..6d8a2d5 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/mystring.h b/usr.bin/window/mystring.h
index 08cae56..3d14ae6 100644
--- a/usr.bin/window/mystring.h
+++ b/usr.bin/window/mystring.h
@@ -34,6 +34,7 @@
* SUCH DAMAGE.
*
* @(#)string.h 8.1 (Berkeley) 6/6/93
+ * $FreeBSD$
*/
#define STR_DEBUG
@@ -46,16 +47,16 @@ char *str_itoa();
#define str_cmp(a, b) strcmp(a, b)
#ifdef STR_DEBUG
-struct string {
- struct string *s_forw;
- struct string *s_back;
+struct mystring {
+ struct mystring *s_forw;
+ struct mystring *s_back;
char s_data[1];
};
-struct string str_head;
+struct mystring str_head;
#define str_offset ((unsigned)str_head.s_data - (unsigned)&str_head)
-#define str_stos(s) ((struct string *)((unsigned)(s) - str_offset))
+#define str_stos(s) ((struct mystring *)((unsigned)(s) - str_offset))
char *str_alloc();
int str_free();
diff --git a/usr.bin/window/parser.h b/usr.bin/window/parser.h
index 747ae4b..30a4503 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 9d1c145..29e3287 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
index 08cae56..3d14ae6 100644
--- a/usr.bin/window/string.h
+++ b/usr.bin/window/string.h
@@ -34,6 +34,7 @@
* SUCH DAMAGE.
*
* @(#)string.h 8.1 (Berkeley) 6/6/93
+ * $FreeBSD$
*/
#define STR_DEBUG
@@ -46,16 +47,16 @@ char *str_itoa();
#define str_cmp(a, b) strcmp(a, b)
#ifdef STR_DEBUG
-struct string {
- struct string *s_forw;
- struct string *s_back;
+struct mystring {
+ struct mystring *s_forw;
+ struct mystring *s_back;
char s_data[1];
};
-struct string str_head;
+struct mystring str_head;
#define str_offset ((unsigned)str_head.s_data - (unsigned)&str_head)
-#define str_stos(s) ((struct string *)((unsigned)(s) - str_offset))
+#define str_stos(s) ((struct mystring *)((unsigned)(s) - str_offset))
char *str_alloc();
int str_free();
diff --git a/usr.bin/window/var.c b/usr.bin/window/var.c
index 1deb402..b2a894e 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();
OpenPOWER on IntegriCloud