aboutsummaryrefslogtreecommitdiff
path: root/comms/xcept/files/patch-ae
blob: 4f04e87faceb3bb96f589b94cb6aca0b060849fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
--- xcept/makefile.orig	Fri May 13 12:19:55 1994
+++ xcept/makefile	Sun Sep  1 14:27:37 1996
@@ -48,23 +48,31 @@
 #   should be displayed in the scripts menu. (Only used when not
 #   overridden by enironment variable XCEPTSCRIPTS or by command line
 #   option '-S').
-SCRIPTSDIR = /usr/local/btx
+SCRIPTSDIR = /usr/local/lib/xcept
 
 
 #define compiler and X11 include+library pathes 
-CC	= gcc
-XINC	= -I/usr/X386/include
-XLIB	= -L/usr/X386/lib
+#CC	= gcc
+XINC	= -I${LOCALBASE}/include
+XLIB	= -L${LOCALBASE}/lib
 #WARN	= -W -Wunused -Wswitch -Wcomment -Wshadow -Wpointer-arith -Wcast-qual
 
 
 #define location of the xcept binary and online manual (for 'make install').
 OWNER	= bin
-GROUP	= uucp
-MODE	= 755
+GROUP	= bin
+BINMODE	= 755
 BINDIR	= /usr/local/bin
-MANDIR	= /usr/local/man/manl
+MANDIR	= /usr/local/man/man1
+MANMODE = 644
 
+.ifdef NOMANCOMPRESS
+MANPAGE = xcept.1
+.else
+MANPAGE = xcept.1.gz
+MANCOMPRESS = gzip -c -9
+MANCLEAN = ${MANPAGE}
+.endif
 
 
 
@@ -73,7 +81,7 @@
 DEFS	= -DDEFAULTCEPTHOSTNAME=\"$(SERVERHOST)\"      \
 	  -DDEFAULTSOCKETPORT=$(SERVERPORT)           \
 	  -DXCEPTSCRIPTS_DEFAULTPATH=\"$(SCRIPTSDIR)\"		
-CFLAGS	= $(XINC) $(WARN) $(DEFS)
+CFLAGS	+= $(XINC) $(WARN) $(DEFS)
 
 
 SRCS = 	xcept.c xfont.c rawfont.c xwin.c layer6.c socket.c buttons.c \
@@ -84,34 +92,31 @@
 
 
 
-all:		xcept
+all:		xcept ${MANPAGE}
 
 xcept:		$(OBJS)
-		@echo 'linking $@'
-		@$(CC) $(OBJS) -o xcept $(XLIB) -lX11 -lnsl -lsocket /usr/ucblib/libucb.a
+		$(CC) $(OBJS) -o xcept $(XLIB) -lX11
 
 $(OBJS):
-		@echo 'compiling $*.c'
-		@$(CC) $(CFLAGS) -c $*.c
+		$(CC) $(CFLAGS) -c $*.c
 
 
 tags:		$(SRCS)
 		etags -e $(SRCS)
 
-install:	xcept
-		strip xcept
-		mv xcept $(BINDIR)
-		-chown $(OWNER) $(BINDIR)/xcept
-		-chgrp $(GROUP) $(BINDIR)/xcept
-		chmod $(MODE)   $(BINDIR)/xcept
-		cp xcept.1 $(MANDIR)
-		-chown $(OWNER) $(MANDIR)/xcept.1
-		-chgrp $(GROUP) $(MANDIR)/xcept.1
-		chmod 644       $(MANDIR)/xcept.1
-
+.ifndef NOMANCOMPRESS
+${MANPAGE}: xcept.1
+	${MANCOMPRESS} < xcept.1 > ${MANPAGE}
+.endif
+
+install:	all
+		${INSTALL} -c -o ${OWNER} -g ${GROUP} -m ${BINMODE} xcept\
+		${BINDIR}/xcept
+		${INSTALL} -c -o ${OWNER} -g ${GROUP} -m ${MANMODE}\
+		${MANPAGE} ${MANDIR}/${MANPAGE}
 
 clean:
-		@rm -f $(OBJS) xcept
+		@rm -f $(OBJS) xcept ${MANCLEAN}
 
 
 
--- xcept/script.c.orig	Fri Sep 24 16:07:29 1993
+++ xcept/script.c	Sun Sep  1 14:08:13 1996
@@ -809,7 +809,6 @@
    if(a->value == b->value)
       return error("pc: %d - variables don't differ!\n",pc);
    len = strlen(a->value) + strlen(b->value) + 1;
-   free(a->value);
    if(!(a->value = ralloc(a->value,len))) return errorp("realloc\n");
    strcat(a->value,b->value);
    
@@ -1082,7 +1082,8 @@
 	    printf( "%s", b->value );
 	    fflush(stdout);
 	 }
-	 gets(tmpstr); 
+	 fgets(tmpstr, 300, stdin); 
+	 if ((ptr = strchr(tmpstr, '\n'))) *ptr = '\0';
    }
    else if(visible) {
       if(echo) {
@@ -1105,7 +1106,8 @@
 	 }
 	 printf("?  ");
 	 fflush(stdout);
-	 gets(tmpstr); 
+	 fgets(tmpstr, 300, stdin); 
+	 if ((ptr = strchr(tmpstr, '\n'))) *ptr = '\0';
 	 if( !strlen(tmpstr) ) strncpy( tmpstr, c->value, sizeof(tmpstr)-1 );
       }
    }
--- xcept/xcept.c.orig	Mon Apr 25 16:13:26 1994
+++ xcept/xcept.c	Sun Sep  1 14:01:54 1996
@@ -945,7 +945,6 @@
 int perr, p1, p2, p3, p4, p5, p6, p7, p8;
 {
    extern int errno;
-   extern char *sys_errlist[];
    static char errstr[200];
 
    if(!visible) {