summaryrefslogtreecommitdiff
path: root/libterm
diff options
context:
space:
mode:
Diffstat (limited to 'libterm')
-rw-r--r--libterm/Makefile18
-rw-r--r--libterm/termcap.c2
-rw-r--r--libterm/tgoto.c2
-rw-r--r--libterm/tputs.c2
4 files changed, 13 insertions, 11 deletions
diff --git a/libterm/Makefile b/libterm/Makefile
index b3432b1..c2ab882 100644
--- a/libterm/Makefile
+++ b/libterm/Makefile
@@ -41,21 +41,23 @@
#
# Sccsid @(#)Makefile 1.2 (gritter) 2/4/02
#
+
+LIB = libtermlib.a
DEFS = -DCM_N -DCM_GT -DCM_B -DCM_D
-# COPT comes from ex.
-CFLAGS = $(DEFS) $(COPT)
SRCS = termcap.c tgoto.c tputs.c
-OBJS = termcap.o tgoto.o tputs.o
+OBJS = $(SRCS:.c=.o)
-.c.o: ; $(CC) $(CFLAGS) -c $<
+.c.o:
+ # COPT comes from ex
+ $(CC) $(CFLAGS) $(DEFS) $(COPT) -c $<
-all: libtermlib.a
+all: $(LIB)
-libtermlib.a: $(OBJS)
- ar cr libtermlib.a $(OBJS)
+$(LIB): $(OBJS)
+ $(AR) crs $@ $(OBJS)
clean:
- rm -f libtermlib.a $(OBJS) core
+ rm -f $(LIB) $(OBJS) core
# DO NOT DELETE
diff --git a/libterm/termcap.c b/libterm/termcap.c
index 6cee780..a4d018e 100644
--- a/libterm/termcap.c
+++ b/libterm/termcap.c
@@ -406,5 +406,5 @@ nextc:
}
/*
-*/
static const char sccssl[] = "@(#)libterm.sl 1.7 (gritter) 11/23/04";
+*/
diff --git a/libterm/tgoto.c b/libterm/tgoto.c
index 07316db..c497046 100644
--- a/libterm/tgoto.c
+++ b/libterm/tgoto.c
@@ -102,7 +102,7 @@ toohard:
return ("OOPS");
}
added[0] = 0;
- while (c = *cp++) {
+ while ((c = *cp++)) {
if (c != '%') {
*dp++ = c;
continue;
diff --git a/libterm/tputs.c b/libterm/tputs.c
index 58e0665..18fc579 100644
--- a/libterm/tputs.c
+++ b/libterm/tputs.c
@@ -116,7 +116,7 @@ tputs(const char *cp, int affcnt, int (*outc)(int))
*/
if (i == 0)
return 1;
- if (ospeed <= 0 || ospeed >= (sizeof tmspc10 / sizeof tmspc10[0]))
+ if (ospeed <= 0 || ospeed >= (int)(sizeof tmspc10 / sizeof tmspc10[0]))
return 1;
/*