diff --git a/usr.bin/window/Makefile b/usr.bin/window/Makefile index fba358747c6a..e1654a6f00f3 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 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 #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 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 /* 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 /* 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 #include #include /* 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 08cae5677b63..3d14ae681cc0 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 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 /* 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 08cae5677b63..3d14ae681cc0 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 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();