diff options
author | cjep <cjep@pkgsrc.org> | 2003-04-27 17:45:30 +0000 |
---|---|---|
committer | cjep <cjep@pkgsrc.org> | 2003-04-27 17:45:30 +0000 |
commit | 138ce904f2dce57d393001485714d21dc05cc15f (patch) | |
tree | 1e9457932138a99bbf2556706bacba7ea50577d7 /editors/joe/patches | |
parent | 9fd04dd30477de6256172b01a905a3e4e7bc1d3f (diff) | |
download | pkgsrc-138ce904f2dce57d393001485714d21dc05cc15f.tar.gz |
Use time_t rather than guess int or long. Fixes build on NetBSD/shark
et al.
Diffstat (limited to 'editors/joe/patches')
-rw-r--r-- | editors/joe/patches/patch-aa | 12 | ||||
-rw-r--r-- | editors/joe/patches/patch-ab | 25 | ||||
-rw-r--r-- | editors/joe/patches/patch-ac | 67 | ||||
-rw-r--r-- | editors/joe/patches/patch-ad | 68 | ||||
-rw-r--r-- | editors/joe/patches/patch-ae | 29 | ||||
-rw-r--r-- | editors/joe/patches/patch-af | 34 | ||||
-rw-r--r-- | editors/joe/patches/patch-ag | 32 | ||||
-rw-r--r-- | editors/joe/patches/patch-ah | 15 |
8 files changed, 150 insertions, 132 deletions
diff --git a/editors/joe/patches/patch-aa b/editors/joe/patches/patch-aa index 775be4887c0..f0cd6ea97d9 100644 --- a/editors/joe/patches/patch-aa +++ b/editors/joe/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.4 2001/05/22 11:37:16 wiz Exp $ +$NetBSD: patch-aa,v 1.5 2003/04/27 17:45:30 cjep Exp $ ---- Makefile.orig Mon Jan 23 07:01:28 1995 +--- Makefile.orig 1995-01-23 06:01:28.000000000 +0000 +++ Makefile @@ -9,9 +9,9 @@ # to go and where you want the man page @@ -15,7 +15,7 @@ $NetBSD: patch-aa,v 1.4 2001/05/22 11:37:16 wiz Exp $ # If you want to use TERMINFO, you have to set # the following variable to 1. Also you have to -@@ -27,7 +27,7 @@ +@@ -27,7 +27,7 @@ TERMINFO = 0 # C compiler options: make's built-in rules use this variable @@ -24,7 +24,7 @@ $NetBSD: patch-aa,v 1.4 2001/05/22 11:37:16 wiz Exp $ # C compiler to use: make's built-in rules use this variable -@@ -45,7 +45,7 @@ +@@ -45,7 +45,7 @@ CC = cc # add '-ltinfo', '-lcurses' or '-ltermlib', # depending on the system. @@ -33,7 +33,7 @@ $NetBSD: patch-aa,v 1.4 2001/05/22 11:37:16 wiz Exp $ # Object files -@@ -84,17 +84,17 @@ +@@ -84,17 +84,17 @@ termidx: termidx.o # Install proceedure @@ -55,7 +55,7 @@ $NetBSD: patch-aa,v 1.4 2001/05/22 11:37:16 wiz Exp $ if [ ! -d $(WHERERC) ]; then mkdir $(WHERERC); chmod a+rx $(WHERERC); fi rm -f $(WHERERC)/joerc $(WHERERC)/jmacsrc $(WHERERC)/jstarrc $(WHERERC)/jpicorc $(WHERERC)/rjoerc $(WHEREMAN)/joe.1 cp joerc $(WHERERC) -@@ -114,13 +114,13 @@ +@@ -114,13 +114,13 @@ install: joe termidx chmod a+r $(WHERERC)/rjoerc chmod a+r $(WHERERC)/jpicorc chmod a+r $(WHEREMAN)/joe.1 diff --git a/editors/joe/patches/patch-ab b/editors/joe/patches/patch-ab index aef0103fbfd..cf1d284c604 100644 --- a/editors/joe/patches/patch-ab +++ b/editors/joe/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.4 2001/05/22 12:23:28 wiz Exp $ +$NetBSD: patch-ab,v 1.5 2003/04/27 17:45:31 cjep Exp $ ---- b.c.orig Fri Jan 20 09:38:25 1995 +--- b.c.orig 1995-01-20 08:38:25.000000000 +0000 +++ b.c -@@ -21,6 +21,9 @@ +@@ -21,6 +21,9 @@ JOE; see the file COPYING. If not, writ #include <pwd.h> #endif #include <errno.h> @@ -12,7 +12,7 @@ $NetBSD: patch-ab,v 1.4 2001/05/22 12:23:28 wiz Exp $ #include "config.h" #include "blocks.h" -@@ -201,6 +204,7 @@ +@@ -201,6 +204,7 @@ long amnt, nlines; if(prop) b->o=prop->o; else b->o=pdefault; mset(b->marks,0,sizeof(b->marks)); @@ -20,7 +20,7 @@ $NetBSD: patch-ab,v 1.4 2001/05/22 12:23:28 wiz Exp $ b->rdonly=0; b->orphan=0; b->oldcur=0; -@@ -255,6 +259,10 @@ +@@ -255,6 +259,10 @@ B *b; { if(b && !--b->count) { @@ -31,7 +31,7 @@ $NetBSD: patch-ab,v 1.4 2001/05/22 12:23:28 wiz Exp $ if(b->changed) abrerr(b->name); if(b==errbuf) errbuf=0; if(b->undo) undorm(b->undo); -@@ -1671,7 +1679,8 @@ +@@ -1671,7 +1679,8 @@ char *s; B *b; long skip,amnt; char *n; @@ -41,7 +41,7 @@ $NetBSD: patch-ab,v 1.4 2001/05/22 12:23:28 wiz Exp $ if(!s || !s[0]) { -@@ -1704,6 +1713,28 @@ +@@ -1704,6 +1713,28 @@ char *s; else fclose(fi); fi=fopen(n,"r"); if(!fi) nowrite=0; @@ -70,7 +70,7 @@ $NetBSD: patch-ab,v 1.4 2001/05/22 12:23:28 wiz Exp $ } joesep(n); -@@ -1761,6 +1792,7 @@ +@@ -1761,6 +1792,7 @@ char *s; vsrm(n); b->er=error; @@ -78,7 +78,7 @@ $NetBSD: patch-ab,v 1.4 2001/05/22 12:23:28 wiz Exp $ return b; } -@@ -1928,7 +1960,7 @@ +@@ -1928,7 +1960,7 @@ long size; if(s[0]=='!') pclose(f); else #endif @@ -87,9 +87,12 @@ $NetBSD: patch-ab,v 1.4 2001/05/22 12:23:28 wiz Exp $ else fflush(f); opnerr:; -@@ -1990,7 +2022,18 @@ +@@ -1988,9 +2020,20 @@ extern char *ctime(); + + void ttsig(sig) { - long tim=time(0); +- long tim=time(0); ++ time_t tim=time(0); B *b; - FILE *f=fopen("DEADJOE","a"); + FILE *f; diff --git a/editors/joe/patches/patch-ac b/editors/joe/patches/patch-ac index 0bc1c8c26ed..9e2deffe171 100644 --- a/editors/joe/patches/patch-ac +++ b/editors/joe/patches/patch-ac @@ -1,57 +1,12 @@ -$NetBSD: patch-ac,v 1.4 2001/05/22 12:23:28 wiz Exp $ +$NetBSD: patch-ac,v 1.5 2003/04/27 17:45:31 cjep Exp $ ---- main.c.orig Sun Jan 22 01:21:08 1995 -+++ main.c -@@ -18,6 +18,10 @@ - - #include <stdio.h> - #include <fcntl.h> -+#if defined(__FreeBSD__) || defined(__NetBSD__) -+#include <locale.h> -+#include <ctype.h> -+#endif - #include "config.h" - #include "w.h" - #include "tty.h" -@@ -187,6 +191,20 @@ - run=namprt(argv[0]); - #endif - -+#if defined(__FreeBSD__) || defined(__NetBSD__) -+ setlocale(LC_ALL, ""); -+ for(c=0;c<256;c++) -+ { int a=0; -+ if(iscntrl(c)) -+ a|=UNDERLINE; -+ if((c&0x80)&&!isprint(c)) -+ a|=INVERSE; -+ xlata[c]=a; -+ if(isprint(c)) -+ xlatc[c]=c; -+ } -+#endif -+ - if(s=getenv("LINES")) sscanf(s,"%d",&lines); - if(s=getenv("COLUMNS")) sscanf(s,"%d",&columns); - if(s=getenv("BAUD")) sscanf(s,"%u",&Baud); -@@ -233,20 +251,6 @@ - } - - #else -- -- s=vsncpy(NULL,0,sc(".")); -- s=vsncpy(sv(s),sv(run)); -- s=vsncpy(sv(s),sc("rc")); -- c=procrc(cap,s); -- if(c==0) goto donerc; -- if(c==1) -- { -- char buf[8]; -- fprintf(stderr,"There were errors in '%s'. Use it anyway?",s); -- fflush(stderr); -- fgets(buf,8,stdin); -- if(buf[0]=='y' || buf[0]=='Y') goto donerc; -- } - - vsrm(s); - s=getenv("HOME"); +--- b.h.orig 1994-12-21 12:04:46.000000000 +0000 ++++ b.h +@@ -60,6 +60,7 @@ struct buffer + int rdonly; /* Set for read-only */ + int internal; /* Set for internal buffers */ + int er; /* Error code when file was loaded */ ++ int filehandle; /* File handle for locking */ + }; + + extern int force; /* Set to have final '\n' added to file */ diff --git a/editors/joe/patches/patch-ad b/editors/joe/patches/patch-ad index 2f5b288d784..add41c5826d 100644 --- a/editors/joe/patches/patch-ad +++ b/editors/joe/patches/patch-ad @@ -1,17 +1,57 @@ -$NetBSD: patch-ad,v 1.2 2001/05/22 11:37:16 wiz Exp $ +$NetBSD: patch-ad,v 1.3 2003/04/27 17:45:31 cjep Exp $ ---- scrn.h.orig Thu Oct 6 08:09:04 1994 -+++ scrn.h -@@ -254,10 +254,10 @@ +--- main.c.orig 1995-01-22 00:21:08.000000000 +0000 ++++ main.c +@@ -18,6 +18,10 @@ JOE; see the file COPYING. If not, writ - #define xlat(a,c) \ - ( \ -- (dspasis && ((unsigned)(c)>=128)) ? \ -+ (dspasis && ((unsigned char)(c)>=128)) ? \ - ((a)=0) \ - : \ -- (((a)=xlata[(unsigned)(c)]), ((c)=xlatc[(unsigned)(c)])) \ -+ (((a)=xlata[(unsigned char)(c)]), ((c)=xlatc[(unsigned char)(c)])) \ - ) + #include <stdio.h> + #include <fcntl.h> ++#if defined(__FreeBSD__) || defined(__NetBSD__) ++#include <locale.h> ++#include <ctype.h> ++#endif + #include "config.h" + #include "w.h" + #include "tty.h" +@@ -187,6 +191,20 @@ char *envv[]; + run=namprt(argv[0]); + #endif - /* int eraeol(SCRN *t,int x,int y); ++#if defined(__FreeBSD__) || defined(__NetBSD__) ++ setlocale(LC_ALL, ""); ++ for(c=0;c<256;c++) ++ { int a=0; ++ if(iscntrl(c)) ++ a|=UNDERLINE; ++ if((c&0x80)&&!isprint(c)) ++ a|=INVERSE; ++ xlata[c]=a; ++ if(isprint(c)) ++ xlatc[c]=c; ++ } ++#endif ++ + if(s=getenv("LINES")) sscanf(s,"%d",&lines); + if(s=getenv("COLUMNS")) sscanf(s,"%d",&columns); + if(s=getenv("BAUD")) sscanf(s,"%u",&Baud); +@@ -234,20 +252,6 @@ char *envv[]; + + #else + +- s=vsncpy(NULL,0,sc(".")); +- s=vsncpy(sv(s),sv(run)); +- s=vsncpy(sv(s),sc("rc")); +- c=procrc(cap,s); +- if(c==0) goto donerc; +- if(c==1) +- { +- char buf[8]; +- fprintf(stderr,"There were errors in '%s'. Use it anyway?",s); +- fflush(stderr); +- fgets(buf,8,stdin); +- if(buf[0]=='y' || buf[0]=='Y') goto donerc; +- } +- + vsrm(s); + s=getenv("HOME"); + if(s) diff --git a/editors/joe/patches/patch-ae b/editors/joe/patches/patch-ae index 809f837e726..7282325a966 100644 --- a/editors/joe/patches/patch-ae +++ b/editors/joe/patches/patch-ae @@ -1,16 +1,17 @@ -$NetBSD: patch-ae,v 1.1 2001/05/22 11:37:16 wiz Exp $ +$NetBSD: patch-ae,v 1.2 2003/04/27 17:45:31 cjep Exp $ ---- termcap.c.orig Mon Jan 23 10:07:10 1995 -+++ termcap.c -@@ -191,7 +191,11 @@ - namebuf=0; - namebuf=vsncpy(sv(namebuf),sc(".termcap ")); - namebuf=vsncpy(sv(namebuf),sc(JOERC)); -+#ifdef __NetBSD__ -+ namebuf=vsncpy(sv(namebuf),sc("termcap /usr/share/misc/termcap")); -+#else - namebuf=vsncpy(sv(namebuf),sc("termcap /etc/termcap")); -+#endif - } - } +--- scrn.h.orig 1994-10-06 08:09:04.000000000 +0100 ++++ scrn.h +@@ -254,10 +254,10 @@ extern int dspasis; + #define xlat(a,c) \ + ( \ +- (dspasis && ((unsigned)(c)>=128)) ? \ ++ (dspasis && ((unsigned char)(c)>=128)) ? \ + ((a)=0) \ + : \ +- (((a)=xlata[(unsigned)(c)]), ((c)=xlatc[(unsigned)(c)])) \ ++ (((a)=xlata[(unsigned char)(c)]), ((c)=xlatc[(unsigned char)(c)])) \ + ) + + /* int eraeol(SCRN *t,int x,int y); diff --git a/editors/joe/patches/patch-af b/editors/joe/patches/patch-af index a463cf9a903..54a81621f16 100644 --- a/editors/joe/patches/patch-af +++ b/editors/joe/patches/patch-af @@ -1,24 +1,16 @@ -$NetBSD: patch-af,v 1.1 2001/05/22 11:37:17 wiz Exp $ +$NetBSD: patch-af,v 1.2 2003/04/27 17:45:31 cjep Exp $ ---- ufile.c.orig Fri Jan 13 18:13:16 1995 -+++ ufile.c -@@ -135,7 +135,7 @@ - int cp(from,to) - char *from, *to; - { -- int f, g, amnt; -+ int f, g, amnt, rc; - struct stat sbuf; - - #ifdef HAVEUTIME -@@ -157,8 +157,8 @@ +--- termcap.c.orig 1995-01-23 09:07:10.000000000 +0000 ++++ termcap.c +@@ -191,7 +191,11 @@ else + namebuf=0; + namebuf=vsncpy(sv(namebuf),sc(".termcap ")); + namebuf=vsncpy(sv(namebuf),sc(JOERC)); ++#ifdef __NetBSD__ ++ namebuf=vsncpy(sv(namebuf),sc("termcap /usr/share/misc/termcap")); ++#else + namebuf=vsncpy(sv(namebuf),sc("termcap /etc/termcap")); ++#endif } - while((amnt=read(f,stdbuf,stdsiz))>0) - if(amnt!=write(g,stdbuf,amnt)) break; -- close(f); close(g); -- if(amnt) return -1; -+ close(f); rc = close(g); -+ if(amnt || rc) return -1; + } - #ifdef HAVEUTIME - #ifdef NeXT diff --git a/editors/joe/patches/patch-ag b/editors/joe/patches/patch-ag index bb8dfe70096..d237a4a7f31 100644 --- a/editors/joe/patches/patch-ag +++ b/editors/joe/patches/patch-ag @@ -1,12 +1,24 @@ -$NetBSD: patch-ag,v 1.1 2001/05/22 12:23:28 wiz Exp $ +$NetBSD: patch-ag,v 1.2 2003/04/27 17:45:31 cjep Exp $ ---- b.h.orig Wed Dec 21 13:04:46 1994 -+++ b.h -@@ -60,6 +60,7 @@ - int rdonly; /* Set for read-only */ - int internal; /* Set for internal buffers */ - int er; /* Error code when file was loaded */ -+ int filehandle; /* File handle for locking */ - }; +--- ufile.c.orig 1995-01-13 17:13:16.000000000 +0000 ++++ ufile.c +@@ -135,7 +135,7 @@ BW *bw; + int cp(from,to) + char *from, *to; + { +- int f, g, amnt; ++ int f, g, amnt, rc; + struct stat sbuf; - extern int force; /* Set to have final '\n' added to file */ + #ifdef HAVEUTIME +@@ -157,8 +157,8 @@ char *from, *to; + } + while((amnt=read(f,stdbuf,stdsiz))>0) + if(amnt!=write(g,stdbuf,amnt)) break; +- close(f); close(g); +- if(amnt) return -1; ++ close(f); rc = close(g); ++ if(amnt || rc) return -1; + + #ifdef HAVEUTIME + #ifdef NeXT diff --git a/editors/joe/patches/patch-ah b/editors/joe/patches/patch-ah new file mode 100644 index 00000000000..6afd96277a4 --- /dev/null +++ b/editors/joe/patches/patch-ah @@ -0,0 +1,15 @@ +--- conf.c.orig Fri Jan 13 17:10:33 1995 ++++ conf.c Sun Apr 27 17:39:41 2003 +@@ -204,8 +204,10 @@ + fprintf(f,"\n"); + + fprintf(f,"char *getenv();\n"); +- if(sizeof(long)==8) fprintf(f,"int time();\n"); +- else fprintf(f,"long time();\n"); ++/* ++ * if(sizeof(long)==8) fprintf(f,"int time();\n"); ++ * else fprintf(f,"long time();\n"); ++ */ + fprintf(f,"void *malloc();\n"); + fprintf(f,"void free();\n"); + fprintf(f,"void *calloc();\n"); |