Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3
termcap
termcap-2.0.8.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File termcap-2.0.8.dif of Package termcap
--- .pkgextract +++ .pkgextract Mon Jul 28 14:06:30 2003 @@ -0,0 +1,2 @@ +patch -p1 -s --suffix=.setuid < ../termcap-2.0.8-setuid.patch +patch -p1 -s --suffix=.tc < ../termcap-2.0.8-fix-tc.patch --- Makefile +++ Makefile Mon Jul 28 14:03:55 2003 @@ -9,14 +9,16 @@ CC=gcc CFLAGS=-O -I. -g -CFLAGS=-O -I. +CFLAGS=$(RPM_OPT_FLAGS) -pipe -I. AR=ar ARFLAGS=ucvr +LN=ln + MAKEINFO=makeinfo -OWNER=bin.bin +OWNER=root.root STATIC_LIB=lib$(LIBNAME).a SHARED_LIB=lib$(LIBNAME).so.$(VERSION) @@ -25,7 +27,8 @@ TARGETS=$(STATIC_LIB) $(SHARED_LIB) # Where is include and dir located? -prefix=/ +prefix=/usr +lib=lib .c.o: $(CC) $(CFLAGS) -c $< @@ -34,63 +37,33 @@ SRCS = termcap.c tparam.c version.c OBJS= $(SRCS:.c=.o) -all lib: pic .depend $(TARGETS) info +all lib: pic .depend $(TARGETS) $(STATIC_LIB): $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) $(SHARED_LIB): $(OBJS) cd pic; \ - $(CC) -shared -o ../$@ -Wl,-soname,$(SONAME_SHARED_LIB) $(OBJS) + $(CC) -shared -o ../$@ -Wl,-soname,$(SONAME_SHARED_LIB) $(OBJS) -lc + $(LN) -sf $(SHARED_LIB) $(SONAME_SHARED_LIB) + $(LN) -sf $(SHARED_LIB) lib$(LIBNAME).so pic: -if [ ! -d pic ]; then mkdir pic; fi -install: lib install-dirs install-data - -if [ -f $(prefix)/lib/$(SHARED_LIB) ]; then \ - mkdir -p $(prefix)/lib/backup; \ - mv $(prefix)/lib/$(SHARED_LIB) \ - $(prefix)/lib/backup/$(SHARED_LIB).$$$$; \ - fi - cp $(SHARED_LIB) $(prefix)/lib - chown $(OWNER) $(prefix)/lib/$(SHARED_LIB) - if [ -x /sbin/ldconfig -o -x /etc/ldconfig ]; then \ - ldconfig; \ - fi - -if [ $(prefix) = "/" ]; then \ - cp -f $(STATIC_LIB) /usr/lib; \ - rm -f /lib/libtermcap.so; \ - rm -f /usr/lib/libtermcap.so; \ - ln -s /lib/$(SHARED_LIB) /usr/lib/libtermcap.so; \ - cp -f termcap.h /usr/include; \ - cp termcap.info* /usr/info; \ - chown $(OWNER) \ - /usr/info/termcap.info* \ - /usr/lib/$(STATIC_LIB) \ - /usr/lib/libtermcap.so \ - /usr/include/termcap.h; \ - else \ - cp -f $(STATIC_LIB) $(prefix)/lib; \ - rm -f $(prefix)/lib/libtermcap.so; \ - ln -s $(prefix)/lib/$(SHARED_LIB) \ - $(prefix)/lib/libtermcap.so; \ - cp -f termcap.h $(prefix)/include; \ - chown $(OWNER) \ - $(prefix)/lib/$(STATIC_LIB) \ - $(prefix)/lib/libtermcap.so \ - $(prefix)/include/termcap.h; \ - fi - -install-dirs: - -if [ $(prefix) = "/" ]; then \ - mkdir -p /usr/lib /usr/info /usr/include /etc /lib; \ - fi - -install-data: - -if [ $(prefix) = "/" ]; then \ - cp termcap.src /etc/termcap; \ - chown $(OWNER) /etc/termcap; \ - fi +install: lib + mkdir -p $(prefix)/$(lib)/termcap $(prefix)/include/termcap $(prefix)/$(lib) + install -m 755 $(SHARED_LIB) $(prefix)/$(lib) + ln -sf $(SHARED_LIB) $(prefix)/$(lib)/$(SONAME_SHARED_LIB) + ln -sf ../$(SHARED_LIB) $(prefix)/$(lib)/termcap/lib$(LIBNAME).so + install -m 644 $(STATIC_LIB) $(prefix)/$(lib)/termcap/ + install -m 644 termcap.h $(prefix)/include/termcap/ + +#install-data: +# -if [ $(prefix) = "/" ]; then \ +# cp termcap.src /etc/termcap; \ +# chown $(OWNER) /etc/termcap; \ +# fi info: termcap.info --- Makefile.Linux +++ Makefile.Linux Tue Jul 15 18:26:18 2003 @@ -0,0 +1,18 @@ +# +# +# Makefile.Linux to integrate package into source tree of S.u.S.E.-Linux +# +# Copyright (C) 1996 S.u.S.E. GmbH Fuerth, Germany. +# +# Please send bug-fixes or comments to feedback@suse.de. +# +# Author: Florian La Roche <florian@suse.de> +# +# + +compile: + make + +install: + make install + --- termcap.c +++ termcap.c Mon Jul 28 13:59:31 2003 @@ -43,7 +43,10 @@ speed_t ospeed; int tputs_baud_rate; char PC; -int tgetent_bufsize = 1024; +#if !defined(TGETENT_BUFSIZE) +#define TGETENT_BUFSIZE 1536 +#endif +int tgetent_bufsize = TGETENT_BUFSIZE; /* We store a terminal description in a linked list. */ struct tc_ent { @@ -108,7 +111,7 @@ c = *s++ & 0x1f; /* See if we want to translate. */ - if ((c & 0x7f) > 31) + if ((c & 0x7f) > 31 && c != ':' && c != '\\') *r++ = c; else { len = s - start; @@ -439,7 +442,7 @@ for(i = l; i; i = i->next) count += strlen(i->cap) + 1; count++; - + /* Malloc this amount. */ sp = xmalloc(count); maxlen = count + 32; /* Just a lot. */ @@ -454,6 +457,10 @@ for(bp = s; *bp; bp++) { *sp++ = *bp; count++; + if (count >= maxlen-1) { + write(2, "tgetent: warning: termcap entry too long\n", 41); + break; + } } *sp++ = ':'; count++; @@ -652,7 +659,7 @@ /*ARGSUSED*/ int main(int argc, char **argv) { - char buf[1024]; + char buf[TGETENT_BUFSIZE]; char *s; char *ts; --- tparam.c +++ tparam.c Mon Jul 28 14:02:44 2003 @@ -24,9 +24,6 @@ #undef STDC_HEADERS #define STDC_HEADERS #define HAVE_UNISTD_H -#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) -#define bcopy(s, d, n) memcpy ((d), (s), (n)) -#endif #endif #ifdef STDC_HEADERS @@ -299,6 +296,10 @@ case 'D': /* %D means weird Delta Data transformation. */ argp[0] -= 2 * (tem % 16); break; + + case 'p': /* %p means push nth arg - ignore. */ + *p++; + break; } } else
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor