update to 3.3, several years worth of changes; from mpech@

This commit is contained in:
naddy 2005-05-24 20:27:49 +00:00
parent 5de4eec333
commit 5ece53f661
13 changed files with 172 additions and 179 deletions

View File

@ -1,12 +1,9 @@
# $RuOBSD: Makefile,v 1.3 2002/04/10 05:14:52 form Exp $
# $OpenBSD: Makefile,v 1.31 2004/11/24 11:08:03 espie Exp $
# $OpenBSD: Makefile,v 1.32 2005/05/24 20:27:49 naddy Exp $
COMMENT= "joe's own editor"
VERSION= 2.9.8
DISTNAME= joe-${VERSION}-pre1
PKGNAME= joe-${VERSION}pre1p1
EXTRACT_SUFX= .tgz
DISTNAME= joe-3.3
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=joe-editor/}
@ -14,28 +11,11 @@ PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c ncurses
WANTLIB= c ncurses m util
MAINTAINER= Mike Pechkin <mpech@openbsd.org>
CONFIGURE_STYLE= gnu
do-install:
${INSTALL_PROGRAM} ${WRKBUILD}/joe ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKBUILD}/termidx ${PREFIX}/bin
@cd ${PREFIX}/bin; \
ln -sf joe jmacs; \
ln -sf joe jpico; \
ln -sf joe jstar; \
ln -sf joe rjoe
${INSTALL_MAN} ${WRKSRC}/joe.1 ${PREFIX}/man/man1
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/joe
${INSTALL_DATA} ${WRKDIST}/INFO ${PREFIX}/share/doc/joe
${INSTALL_DATA} ${WRKDIST}/README ${PREFIX}/share/doc/joe
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/joe
.for f in jmacsrc joerc jpicorc jstarrc rjoerc
${INSTALL_DATA} ${WRKDIST}/${f} \
${PREFIX}/share/examples/joe
.endfor
SEPARATE_BUILD= simple
.include <bsd.port.mk>

View File

@ -1,4 +1,4 @@
MD5 (joe-2.9.8-pre1.tgz) = ea66378192b194ebb565a927c86bacb2
RMD160 (joe-2.9.8-pre1.tgz) = 95cef5c391058549067889b6848396bd15a88b01
SHA1 (joe-2.9.8-pre1.tgz) = bd2c374520629defd6f33c921988ce5ac5814c01
SIZE (joe-2.9.8-pre1.tgz) = 260652
MD5 (joe-3.3.tar.gz) = 02221716679c039c5da00c275d61dbf4
RMD160 (joe-3.3.tar.gz) = f85ff66c0e00cbb85c0063601f3b41459bf2b336
SHA1 (joe-3.3.tar.gz) = f961fe68fa7c11a8d2334b15028661fb46a2d773
SIZE (joe-3.3.tar.gz) = 478218

View File

@ -1,12 +1,30 @@
$OpenBSD: patch-Makefile_in,v 1.1 2002/04/24 11:05:06 form Exp $
--- Makefile.in.orig Tue Apr 9 18:15:48 2002
+++ Makefile.in Tue Apr 9 18:15:58 2002
@@ -91,7 +91,7 @@ noinst_HEADERS = b.h blocks.h bw.h cmd.h
$OpenBSD: patch-Makefile_in,v 1.2 2005/05/24 20:27:49 naddy Exp $
--- Makefile.in.orig Wed May 18 05:21:29 2005
+++ Makefile.in Sat May 21 22:04:12 2005
@@ -257,7 +257,7 @@ EXTRA_DIST = COPYING LIST HACKING Change
syntax/awk.jsf.in syntax/cobol.jsf.in syntax/sed.jsf.in syntax/ps.jsf.in \
cygbuild setup.hint xterm-patch xterm-readme syntax/ada.jsf.in
-sysconf_joedir = $(sysconfdir)/joe
+sysconf_joedir = $(prefix)/share/examples/joe
sysconf_joe_DATA = joerc jmacsrc jstarrc rjoerc jpicorc
MOSTLYCLEANFILES = joerc jmacsrc jstarrc rjoerc jpicorc joe.1
sysconf_syntaxdir = $(sysconf_joedir)/syntax
@@ -272,7 +272,7 @@ sysconf_syntax_DATA = syntax/c.jsf synta
bin_PROGRAMS = joe termidx
-INCLUDES = -DJOERC="\"@sysconfdir@/\""
+INCLUDES = -DJOERC="\"@sysconfdir@/joe/\""
sysconf_charmapsdir = $(sysconf_joedir)/charmaps
sysconf_charmaps_DATA = charmaps/klingon
-sysconf_docdir = $(sysconf_joedir)/doc
+sysconf_docdir = $(prefix)/share/doc/joe
sysconf_doc_DATA = LIST README HINTS ChangeLog HACKING NEWS
man_MANS = joe.1
noinst_HEADERS = b.h blocks.h bw.h cmd.h config.h hash.h help.h kbd.h \
@@ -281,7 +281,7 @@ noinst_HEADERS = b.h blocks.h bw.h cmd.h
ufile.h uformat.h uisrch.h umath.h undo.h usearch.h ushell.h utag.h \
utils.h va.h vfile.h vs.h w.h utf8.h syntax.h i18n.h charmap.h mouse.h
-INCLUDES = -DJOERC="\"$(DESTDIR)$(sysconf_joedir)/\""
+INCLUDES = -DJOERC="\"$(sysconfdir)/joe/\""
joe_LDADD = -lm
joe_SOURCES = b.c blocks.c bw.c cmd.c hash.c help.c kbd.c macro.c main.c menu.c \
path.c poshist.c pw.c queue.c qw.c rc.c regex.c scrn.c tab.c termcap.c \

View File

@ -1,53 +1,42 @@
$OpenBSD: patch-b_c,v 1.1 2002/04/24 11:05:06 form Exp $
--- b.c.orig Mon Dec 10 22:48:53 2001
+++ b.c Tue Apr 9 19:18:31 2002
@@ -185,6 +185,7 @@ static B *bmkchn(H *chn, B *prop, long a
$OpenBSD: patch-b_c,v 1.2 2005/05/24 20:27:49 naddy Exp $
--- b.c.orig Sat May 21 21:49:04 2005
+++ b.c Sat May 21 21:52:29 2005
@@ -196,6 +196,7 @@ static B *bmkchn(H *chn, B *prop, long a
else
b->o = pdefault;
mset(b->marks, 0, sizeof(b->marks));
+ b->filehandle = -1; /* initialize filehande &&& ob */
+ b->filehandle = -1;
b->rdonly = 0;
b->orphan = 0;
b->oldcur = 0;
@@ -237,6 +238,10 @@ extern B *errbuf;
b->oldcur = NULL;
@@ -255,6 +256,8 @@ extern B *errbuf;
void brm(B *b)
{
if (b && !--b->count) {
+ if (b->filehandle != -1) {
+ /* close filehandle, free lock &&& ob */
+ if (b->filehandle != -1)
+ close (b->filehandle);
+ }
if (b->changed)
abrerr(b->name);
if (b == errbuf)
@@ -1791,7 +1796,7 @@ B *bload(char *s)
if (b->locked && !b->ignored_lock && plain_file(b))
@@ -2119,7 +2122,7 @@ B *bload(unsigned char *s)
B *b;
long skip, amnt;
char *n;
unsigned char *n;
- int nowrite = 0;
+ int nowrite = 0, fh = -1;
if (!s || !s[0]) {
error = -1;
@@ -1838,6 +1843,12 @@ B *bload(char *s)
P *p;
int x;
long mod_time = 0;
@@ -2172,6 +2175,12 @@ B *bload(unsigned char *s)
setopt(b,n);
b->rdonly = b->o.readonly;
goto opnerr;
}
+ /* Lock the file &&& ob,petef */
+ if (fi && !nowrite) {
+ fh = dup( fileno(fi) );
+ nowrite = (flock (fh, LOCK_EX | LOCK_NB));
+ }
+
+ /* Lock the file &&& ob,petef */
+ if (fi && !nowrite) {
+ fh = dup(fileno(fi));
+ nowrite = (flock (fh, LOCK_EX | LOCK_NB));
}
/* Skip data if we need to */
if (skip && lseek(fileno(fi), skip, 0) < 0) {
int r;
@@ -1893,6 +1904,8 @@ B *bload(char *s)
vsrm(n);
b->er = error;
+ if (fh != -1)
+ b->filehandle = fh;
return b;
}

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-help_c,v 1.1 2002/05/22 07:55:29 form Exp $
--- help.c.orig Wed May 22 14:51:07 2002
+++ help.c Wed May 22 14:51:15 2002
@@ -41,7 +41,7 @@ int help_init(char *filename)
if (!(fd = fopen(filename, "r"))) /* open the help file */
return -1; /* return if we couldn't open the file */
- fprintf(stderr, "Processing '%s'...", filename);
+ fprintf(stderr, "Processing help '%s'...", filename);
fflush(stderr);
while (fgets(buf, sizeof(buf), fd)) {

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-joe_1_in,v 1.1 2002/04/24 11:05:06 form Exp $
--- joe.1.in.orig Wed Apr 10 17:45:20 2002
+++ joe.1.in Wed Apr 10 17:45:52 2002
@@ -79,7 +79,7 @@ ESC .). Use \fB^K H\fR to dismiss the h
You can customize the keyboard layout, the help screens and a number of
behavior defaults by copying JOE's initialization file (usually
-\fB@sysconfdir@/joerc\fR) to \fB.joerc\fR in your home directory and then
+\fB@sysconfdir@/joe/joerc\fR) to \fB.joerc\fR in your home directory and then
by modifying it. See the section \fBjoerc\fR below.
To have JOE used as your default editor for e-mail and News, you need to set
@@ -781,7 +781,7 @@ quota.
.SH The\ joerc file
\fB^T\fR options, the help screens and the key-sequence to editor command
bindings are all defined in JOE's initialization file. If you make a copy
-of this file (which normally resides in \fB@sysconfdir@/joerc\fR) to
+of this file (which normally resides in \fB@sysconfdir@/joe/joerc\fR) to
\fB$HOME/.joerc\fR, you can customize these setting to your liking. The
syntax of the initialization file should be fairly obvious and there are
further instruction in it.

View File

@ -1,25 +1,35 @@
$OpenBSD: patch-joerc_in,v 1.1 2002/04/24 11:05:06 form Exp $
--- joerc.in.orig Tue Apr 9 18:31:07 2002
+++ joerc.in Tue Apr 9 18:35:01 2002
@@ -153,7 +153,7 @@
binding section below- but without the key name strings.
$OpenBSD: patch-joerc_in,v 1.2 2005/05/24 20:27:49 naddy Exp $
--- joerc.in.orig Tue May 3 20:32:39 2005
+++ joerc.in Mon May 23 16:53:48 2005
@@ -318,10 +318,11 @@
No '.' in file name? Assume it's a text file and we want wordwrap on.
*
--wordwrap
+-asis
*.c
-autoindent
@@ -455,6 +455,8 @@ bof ^K ^U
File name with '.'? It's probably not a text file.
*.*
+-asis
Diff
*
@@ -1320,9 +1321,11 @@ blksave ^K w
bof ^K U Goto beginning of file
bof ^K ^U
bof ^K u
bol .kh Goto beginning of line
bol ^A
- bol .kh Goto beginning of line
- bol ^A
- bol ^# SP A
+bol .kh Goto beginning of line
+bol ^A
+bol ^# SP A
+bol ^[ [ H
+bol ^[ [ 7 ~
home .kh
home ^A
center ^K A Center line
center ^K ^A
center ^K a
@@ -478,6 +480,8 @@ eof ^K v
@@ -1349,6 +1352,8 @@ eof ^K v
eol .kH Go to end of line
eol .@7
eol ^E
@ -28,21 +38,3 @@ $OpenBSD: patch-joerc_in,v 1.1 2002/04/24 11:05:06 form Exp $
exsave ^K X Save and exit
exsave ^K ^X
exsave ^K x
@@ -562,6 +566,8 @@ bofmenu ^K ^U
bofmenu ^K u
bolmenu .kh
bolmenu ^A
+bolmenu ^[ [ H
+bolmenu ^[ [ 7 ~
dnarwmenu .kd
dnarwmenu ^N
dnarwmenu ^[ [ B
@@ -571,6 +577,8 @@ eofmenu ^K ^V
eofmenu ^K v
eolmenu .kH
eolmenu ^E
+eolmenu ^[ [ F
+eolmenu ^[ [ 8 ~
ltarwmenu .kl
ltarwmenu ^B
ltarwmenu ^[ [ D

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-menu_c,v 1.1 2005/05/24 20:27:49 naddy Exp $
--- menu.c.orig Mon Apr 25 16:11:23 2005
+++ menu.c Mon May 23 16:40:59 2005
@@ -147,6 +147,7 @@ static void menuresz(MENU *m, int wi, in
int umbol(MENU *m)
{
+ fprintf(stderr,"fffFmI\n");
m->cursor -= m->cursor % m->perline;
return 0;
}

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-rc_c,v 1.1 2002/05/22 07:55:29 form Exp $
--- rc.c.orig Wed May 22 14:50:50 2002
+++ rc.c Wed May 22 14:50:58 2002
@@ -574,7 +574,7 @@ int procrc(CAP *cap, char *name)
if (!fd)
return -1; /* Return if we couldn't open the rc file */
- fprintf(stderr, "Processing '%s'...", name);
+ fprintf(stderr, "Processing rc '%s'...", name);
fflush(stderr);
while (++line, fgets(buf, 1024, fd))

View File

@ -1,11 +1,11 @@
$OpenBSD: patch-types_h,v 1.1 2002/04/24 11:05:06 form Exp $
--- types.h.orig Mon Dec 3 19:18:54 2001
+++ types.h Tue Apr 9 19:00:56 2002
@@ -163,6 +163,7 @@ struct buffer {
int rdonly; /* Set for read-only */
int internal; /* Set for internal buffers */
$OpenBSD: patch-types_h,v 1.2 2005/05/24 20:27:49 naddy Exp $
--- types.h.orig Sat May 21 21:47:40 2005
+++ types.h Sat May 21 21:47:52 2005
@@ -208,6 +208,7 @@ struct buffer {
int er; /* Error code when file was loaded */
+ int filehandle; /* File handle for locking */
pid_t pid; /* Process id */
int out; /* fd to write to process */
+ int filehandle; /* fd to lock file */
};

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-ufile_c,v 1.2 2002/09/26 23:00:08 brad Exp $
--- ufile.c.orig Thu Sep 26 18:51:37 2002
+++ ufile.c Thu Sep 26 18:53:10 2002
@@ -151,7 +151,7 @@ static int cp(char *from, char *to)
if (fstat(f, &sbuf) < 0) {
return -1;
}
- g = creat(to, sbuf.st_mode);
+ g = creat(to, sbuf.st_mode & ~(S_ISUID | S_ISGID));
if (g < 0) {
close(f);
return -1;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-usearch_c,v 1.1 2003/06/19 13:56:11 avsm Exp $
--- usearch.c.orig Wed Jun 18 04:13:22 2003
+++ usearch.c Wed Jun 18 04:13:49 2003
@@ -346,7 +346,7 @@ static int set_pattern(BW *bw, char *s,
if (srch->backwards)
binsc(pbw->cursor, 'b');
if (srch->repeat >= 0)
- snprintf(buf, JOE_MSGBUFSIZE, "%d", srch->repeat), binss(pbw->cursor, buf);
+ snprintf(buf, sizeof buf, "%d", srch->repeat), binss(pbw->cursor, buf);
pset(pbw->cursor, pbw->b->eof);
pbw->cursor->xcol = piscol(pbw->cursor);
srch->ignore = 0;

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.11 2004/09/15 18:01:06 espie Exp $
@comment $OpenBSD: PLIST,v 1.12 2005/05/24 20:27:49 naddy Exp $
bin/jmacs
bin/joe
bin/jpico
@ -7,10 +7,18 @@ bin/rjoe
bin/termidx
@man man/man1/joe.1
share/doc/joe/
share/doc/joe/INFO
share/doc/joe/ChangeLog
share/doc/joe/HACKING
share/doc/joe/HINTS
share/doc/joe/LIST
share/doc/joe/NEWS
share/doc/joe/README
@sample ${SYSCONFDIR}/joe/
share/examples/joe/
@sample ${SYSCONFDIR}/joe/
share/examples/joe/charmaps/
@sample ${SYSCONFDIR}/joe/charmaps/
share/examples/joe/charmaps/klingon
@sample ${SYSCONFDIR}/joe/charmaps/klingon
share/examples/joe/jmacsrc
@sample ${SYSCONFDIR}/joe/jmacsrc
share/examples/joe/joerc
@ -21,3 +29,67 @@ share/examples/joe/jstarrc
@sample ${SYSCONFDIR}/joe/jstarrc
share/examples/joe/rjoerc
@sample ${SYSCONFDIR}/joe/rjoerc
share/examples/joe/syntax/
@sample ${SYSCONFDIR}/joe/syntax/
share/examples/joe/syntax/4gl.jsf
@sample ${SYSCONFDIR}/joe/syntax/4gl.jsf
share/examples/joe/syntax/ada.jsf
@sample ${SYSCONFDIR}/joe/syntax/ada.jsf
share/examples/joe/syntax/asm.jsf
@sample ${SYSCONFDIR}/joe/syntax/asm.jsf
share/examples/joe/syntax/awk.jsf
@sample ${SYSCONFDIR}/joe/syntax/awk.jsf
share/examples/joe/syntax/c.jsf
@sample ${SYSCONFDIR}/joe/syntax/c.jsf
share/examples/joe/syntax/cobol.jsf
@sample ${SYSCONFDIR}/joe/syntax/cobol.jsf
share/examples/joe/syntax/conf.jsf
@sample ${SYSCONFDIR}/joe/syntax/conf.jsf
share/examples/joe/syntax/csh.jsf
@sample ${SYSCONFDIR}/joe/syntax/csh.jsf
share/examples/joe/syntax/css.jsf
@sample ${SYSCONFDIR}/joe/syntax/css.jsf
share/examples/joe/syntax/diff.jsf
@sample ${SYSCONFDIR}/joe/syntax/diff.jsf
share/examples/joe/syntax/fortran.jsf
@sample ${SYSCONFDIR}/joe/syntax/fortran.jsf
share/examples/joe/syntax/html.jsf
@sample ${SYSCONFDIR}/joe/syntax/html.jsf
share/examples/joe/syntax/java.jsf
@sample ${SYSCONFDIR}/joe/syntax/java.jsf
share/examples/joe/syntax/lisp.jsf
@sample ${SYSCONFDIR}/joe/syntax/lisp.jsf
share/examples/joe/syntax/mail.jsf
@sample ${SYSCONFDIR}/joe/syntax/mail.jsf
share/examples/joe/syntax/mason.jsf
@sample ${SYSCONFDIR}/joe/syntax/mason.jsf
share/examples/joe/syntax/ocaml.jsf
@sample ${SYSCONFDIR}/joe/syntax/ocaml.jsf
share/examples/joe/syntax/pascal.jsf
@sample ${SYSCONFDIR}/joe/syntax/pascal.jsf
share/examples/joe/syntax/perl.jsf
@sample ${SYSCONFDIR}/joe/syntax/perl.jsf
share/examples/joe/syntax/php.jsf
@sample ${SYSCONFDIR}/joe/syntax/php.jsf
share/examples/joe/syntax/ps.jsf
@sample ${SYSCONFDIR}/joe/syntax/ps.jsf
share/examples/joe/syntax/python.jsf
@sample ${SYSCONFDIR}/joe/syntax/python.jsf
share/examples/joe/syntax/sed.jsf
@sample ${SYSCONFDIR}/joe/syntax/sed.jsf
share/examples/joe/syntax/sh.jsf
@sample ${SYSCONFDIR}/joe/syntax/sh.jsf
share/examples/joe/syntax/sml.jsf
@sample ${SYSCONFDIR}/joe/syntax/sml.jsf
share/examples/joe/syntax/sql.jsf
@sample ${SYSCONFDIR}/joe/syntax/sql.jsf
share/examples/joe/syntax/tcl.jsf
@sample ${SYSCONFDIR}/joe/syntax/tcl.jsf
share/examples/joe/syntax/tex.jsf
@sample ${SYSCONFDIR}/joe/syntax/tex.jsf
share/examples/joe/syntax/verilog.jsf
@sample ${SYSCONFDIR}/joe/syntax/verilog.jsf
share/examples/joe/syntax/vhdl.jsf
@sample ${SYSCONFDIR}/joe/syntax/vhdl.jsf
share/examples/joe/syntax/xml.jsf
@sample ${SYSCONFDIR}/joe/syntax/xml.jsf