Import ports/editors/se. ok sthen@
se is a screen oriented version of the classic UNIX text editor ed. It has a full visual interface allowing you to see the text you're editing. It's command syntax will be very familiar to users who already know ed. Some of se's additional features are, a built-in help system, configurable options that can be loaded from a startup file, the ability to be ran interactively or via the included scriptse utility, and optional usage logging.
This commit is contained in:
parent
8ab8805b44
commit
77526cd665
24
editors/se/Makefile
Normal file
24
editors/se/Makefile
Normal file
@ -0,0 +1,24 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2013/05/04 15:13:47 jturner Exp $
|
||||
|
||||
COMMENT = screen oriented version of the classic text editor ed
|
||||
|
||||
DISTNAME = se-3.0.1
|
||||
CATEGORIES = editors
|
||||
|
||||
MAINTAINER = James Turner <james@calminferno.net>
|
||||
|
||||
HOMEPAGE = http://se-editor.org/
|
||||
MASTER_SITES = http://se-editor.org/dist/
|
||||
|
||||
# PD
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
WANTLIB = c ncurses
|
||||
|
||||
USE_GROFF = Yes
|
||||
|
||||
CONFIGURE_STYLE = gnu
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
.include <bsd.port.mk>
|
2
editors/se/distinfo
Normal file
2
editors/se/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (se-3.0.1.tar.gz) = 4g0cTXPe5F0xmghsy1QVfxvZQCmvnWDHhfZRJG4glIY=
|
||||
SIZE (se-3.0.1.tar.gz) = 170236
|
75
editors/se/patches/patch-src_edit_c
Normal file
75
editors/se/patches/patch-src_edit_c
Normal file
@ -0,0 +1,75 @@
|
||||
$OpenBSD: patch-src_edit_c,v 1.1.1.1 2013/05/04 15:13:47 jturner Exp $
|
||||
|
||||
commit 7677b8ad51c5bbcae9dd08afb08d32e242d497ce
|
||||
Author: James Turner <james@calminferno.net>
|
||||
Date: Fri May 3 17:19:38 2013 -0400
|
||||
|
||||
--- src/edit.c.orig Fri May 3 22:19:53 2013
|
||||
+++ src/edit.c Fri May 3 22:23:49 2013
|
||||
@@ -1222,23 +1222,30 @@ int settab (char str[])
|
||||
}
|
||||
|
||||
|
||||
-/* serc_safe --- check if the file permissions and ownership are safe */
|
||||
+/* serc_safe_open --- open and check if the file permissions and ownership are safe */
|
||||
|
||||
/*
|
||||
* err on the side of caution and only exec ~/.serc and ./serc files
|
||||
* that we own and cannot be written by others.
|
||||
*/
|
||||
|
||||
-int serc_safe (char *path)
|
||||
+FILE *serc_safe_open (char *path)
|
||||
{
|
||||
+ FILE *fp;
|
||||
int rc;
|
||||
uid_t our_euid;
|
||||
struct stat sbuf;
|
||||
|
||||
- rc = stat (path, &sbuf);
|
||||
+ if ((fp = fopen (path, "r")) == NULL)
|
||||
+ {
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ rc = fstat (fileno(fp), &sbuf);
|
||||
if (rc != 0)
|
||||
{
|
||||
- return NO;
|
||||
+ fclose(fp);
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
our_euid = geteuid ();
|
||||
@@ -1246,16 +1253,18 @@ int serc_safe (char *path)
|
||||
/* don't exec .serc files that aren't ours */
|
||||
if (sbuf.st_uid != our_euid)
|
||||
{
|
||||
- return NO;
|
||||
+ fclose(fp);
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
/* don't .serc files that others can write to */
|
||||
if ((sbuf.st_mode & S_IWGRP) || (sbuf.st_mode & S_IWOTH))
|
||||
{
|
||||
- return NO;
|
||||
+ fclose(fp);
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
- return YES;
|
||||
+ return fp;
|
||||
}
|
||||
|
||||
|
||||
@@ -1285,8 +1294,7 @@ void serc (void)
|
||||
|
||||
for (i = 0; serc_files[i]; i++)
|
||||
{
|
||||
- if ((serc_safe (serc_files[i]) == YES) &&
|
||||
- ((fp = fopen (serc_files[i], "r")) != NULL))
|
||||
+ if ((fp = serc_safe_open (serc_files[i])) != NULL)
|
||||
{
|
||||
break;
|
||||
}
|
17
editors/se/patches/patch-src_edit_h
Normal file
17
editors/se/patches/patch-src_edit_h
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-src_edit_h,v 1.1.1.1 2013/05/04 15:13:47 jturner Exp $
|
||||
|
||||
commit 7677b8ad51c5bbcae9dd08afb08d32e242d497ce
|
||||
Author: James Turner <james@calminferno.net>
|
||||
Date: Fri May 3 17:19:38 2013 -0400
|
||||
|
||||
--- src/edit.h.orig Fri May 3 22:24:46 2013
|
||||
+++ src/edit.h Fri May 3 22:24:41 2013
|
||||
@@ -31,7 +31,7 @@ int optpat(char lin[], int *i);
|
||||
int ptscan(int way, int *num);
|
||||
int settab(char str[]);
|
||||
void serc(void);
|
||||
-int serc_safe (char *path);
|
||||
+FILE *serc_safe_open (char *path);
|
||||
char *sysname(void);
|
||||
void log_usage(void);
|
||||
|
8
editors/se/pkg/DESCR
Normal file
8
editors/se/pkg/DESCR
Normal file
@ -0,0 +1,8 @@
|
||||
se is a screen oriented version of the classic UNIX text editor ed. It
|
||||
has a full visual interface allowing you to see the text you're editing.
|
||||
It's command syntax will be very familiar to users who already know ed.
|
||||
|
||||
Some of se's additional features are, a built-in help system,
|
||||
configurable options that can be loaded from a startup file, the ability
|
||||
to be ran interactively or via the included scriptse utility, and
|
||||
optional usage logging.
|
85
editors/se/pkg/PLIST
Normal file
85
editors/se/pkg/PLIST
Normal file
@ -0,0 +1,85 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2013/05/04 15:13:47 jturner Exp $
|
||||
@bin bin/scriptse
|
||||
@bin bin/se
|
||||
@man man/man1/scriptse.1
|
||||
@man man/man1/se.1
|
||||
share/se/
|
||||
share/se/help/
|
||||
share/se/help/a
|
||||
share/se/help/abt
|
||||
share/se/help/ah
|
||||
share/se/help/arg2
|
||||
share/se/help/args
|
||||
share/se/help/b
|
||||
share/se/help/bang
|
||||
share/se/help/bug
|
||||
share/se/help/c
|
||||
share/se/help/cc
|
||||
share/se/help/ccmisc
|
||||
share/se/help/chardel
|
||||
share/se/help/charins
|
||||
share/se/help/colon
|
||||
share/se/help/com
|
||||
share/se/help/comdir
|
||||
share/se/help/comsyn
|
||||
share/se/help/d
|
||||
share/se/help/dir
|
||||
share/se/help/e
|
||||
share/se/help/eh
|
||||
share/se/help/elp
|
||||
share/se/help/equal
|
||||
share/se/help/f
|
||||
share/se/help/g
|
||||
share/se/help/h
|
||||
share/se/help/i
|
||||
share/se/help/j
|
||||
share/se/help/k
|
||||
share/se/help/l
|
||||
share/se/help/list
|
||||
share/se/help/ln
|
||||
share/se/help/m
|
||||
share/se/help/motion
|
||||
share/se/help/n
|
||||
share/se/help/o
|
||||
share/se/help/o-
|
||||
share/se/help/oa
|
||||
share/se/help/oc
|
||||
share/se/help/od
|
||||
share/se/help/of
|
||||
share/se/help/og
|
||||
share/se/help/oh
|
||||
share/se/help/oi
|
||||
share/se/help/ok
|
||||
share/se/help/ol
|
||||
share/se/help/olm
|
||||
share/se/help/om
|
||||
share/se/help/os
|
||||
share/se/help/ot
|
||||
share/se/help/ou
|
||||
share/se/help/ov
|
||||
share/se/help/ow
|
||||
share/se/help/ox
|
||||
share/se/help/oy
|
||||
share/se/help/oz
|
||||
share/se/help/p
|
||||
share/se/help/pat
|
||||
share/se/help/patex
|
||||
share/se/help/q
|
||||
share/se/help/quote
|
||||
share/se/help/r
|
||||
share/se/help/rpt
|
||||
share/se/help/s
|
||||
share/se/help/scan
|
||||
share/se/help/serc
|
||||
share/se/help/shell
|
||||
share/se/help/specl
|
||||
share/se/help/t
|
||||
share/se/help/termchar
|
||||
share/se/help/tilde
|
||||
share/se/help/u
|
||||
share/se/help/v
|
||||
share/se/help/w
|
||||
share/se/help/x
|
||||
share/se/help/y
|
||||
share/se/help/z
|
||||
share/se/sample.serc
|
Loading…
Reference in New Issue
Block a user