aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1996-03-18 18:54:46 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1996-03-18 18:54:46 +0000
commit5e15ed1c0757a42cb97be02e0e2e99c73d04d907 (patch)
tree7d3b9684ea7f8c0dab0f693f24a4faf9ebf29369 /editors
parent88f6465165ee0aa4a3c22b759647eb6eba6961de (diff)
Notes
Diffstat (limited to 'editors')
-rw-r--r--editors/bpatch/Makefile21
-rw-r--r--editors/bpatch/distinfo1
-rw-r--r--editors/bpatch/files/patch-aa45
-rw-r--r--editors/bpatch/files/patch-ab147
-rw-r--r--editors/bpatch/pkg-comment1
-rw-r--r--editors/bpatch/pkg-descr12
-rw-r--r--editors/bpatch/pkg-plist2
7 files changed, 229 insertions, 0 deletions
diff --git a/editors/bpatch/Makefile b/editors/bpatch/Makefile
new file mode 100644
index 000000000000..6a7970a449ae
--- /dev/null
+++ b/editors/bpatch/Makefile
@@ -0,0 +1,21 @@
+# New ports collection makefile for: bpatch
+# Version required: no version information
+# Date created: 18 March 1996
+# Whom: joerg
+#
+# $Id$
+#
+# Note:
+# The file lacks any redistribution notice, but I know that it has
+# been posted to comp.sources.unix ages ago, and the README mentions
+# the word "public domain". -- Jörg
+
+DISTNAME= bpatch
+PKGNAME= bpatch-1.0
+CATEGORIES+= editors
+MASTER_SITES= ftp://ftp.germany.eu.net/pub/utils/bpatch/
+MAINTAINER= joerg@FreeBSD.org
+
+NO_WRKSUBDIR= yes
+
+.include <bsd.port.mk>
diff --git a/editors/bpatch/distinfo b/editors/bpatch/distinfo
new file mode 100644
index 000000000000..fc4a0d413cb0
--- /dev/null
+++ b/editors/bpatch/distinfo
@@ -0,0 +1 @@
+MD5 (bpatch.tar.gz) = f7fd8f16cc0b0fe76cf5b30fb71e44ed
diff --git a/editors/bpatch/files/patch-aa b/editors/bpatch/files/patch-aa
new file mode 100644
index 000000000000..859b2f6854d0
--- /dev/null
+++ b/editors/bpatch/files/patch-aa
@@ -0,0 +1,45 @@
+--- /dev/null Mon Mar 18 12:50:49 1996
++++ Makefile Mon Mar 18 19:30:47 1996
+@@ -0,0 +1,42 @@
++# This may have to change on your system.
++# You may have to fiddle with various combinations of curses, termcap,
++# terminfo, etc. Good luck!
++PREFIX?= /usr/local
++BINDIR= ${PREFIX}/bin
++MANDIR= ${PREFIX}/man/man1
++
++LIBS = -lncurses -ltermcap
++#LIBS = -ltermlib
++#LIBS = -lterminfo
++#for sysV
++#LIBS = -lcurses
++
++# However you need getopt.
++#GETOPT = -lgetopt
++#not for sysV! (nor for some BSD)
++#GETOPT =
++
++# If you're running on a 4.[23] system, you probably want this.
++#WORK = -DMOD_HAX
++#sysV
++#WORK =
++
++#BSD or thereabouts
++CFLAGS+= $(WORK)
++#Microport sysV/AT, large model, for sdb debugger
++#CFLAGS = -g -Ml
++
++all: bpatch bpatch.1.gz
++
++clean:
++ rm -f bpatch bpatch.o bpatch.1.gz *.core
++
++bpatch: bpatch.o
++ $(CC) -o bpatch $(CFLAGS) bpatch.o $(GETOPT) $(LIBS)
++
++bpatch.1.gz: bpatch.1
++ gzip -c < bpatch.1 > bpatch.1.gz
++
++install: bpatch bpatch.1.gz
++ install -c -o bin -g bin -m 555 bpatch ${DESTDIR}${BINDIR}
++ install -c -o bin -g bin -m 444 bpatch.1.gz ${DESTDIR}${MANDIR}
diff --git a/editors/bpatch/files/patch-ab b/editors/bpatch/files/patch-ab
new file mode 100644
index 000000000000..0ce8bfb4c489
--- /dev/null
+++ b/editors/bpatch/files/patch-ab
@@ -0,0 +1,147 @@
+--- bpatch.c.orig Wed Jan 17 15:33:33 1990
++++ bpatch.c Mon Mar 18 19:23:16 1996
+@@ -90,10 +90,15 @@
+ /*E*/
+ /*S includes, globals, and defines */
+ /*Page Eject*/
+-#include <curses.h>
++#include <ncurses.h>
+ #include <fcntl.h>
+ #include <signal.h>
+ #include <ctype.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <stdio.h>
++#include <termios.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
+@@ -103,14 +108,8 @@
+ void icc ();
+ void copyrec ();
+ void schwapp ();
+-
+-/* added declarations, mostly for cleanliness */
+-extern long lseek();
+-extern long atol();
+-extern char *strncpy();
+-extern void exit();
+-extern unsigned sleep(); /* signal problems ??? if sleep called */
+-extern void perror();
++void breakp ();
++void reset ();
+
+ /* set up for calls to outstr and errmsg, etc, */
+ /* by use of sprintf to fill outbuf */
+@@ -190,7 +189,7 @@
+ #ifdef MOD_HAX
+ #else /* use original code... */
+ /* plus some more for restoring terminal function */
+- struct termio asis, aswas;
++ struct termios asis, aswas;
+ #endif /* MOD_HAX */
+
+ /*S main - control all the work from here */
+@@ -210,12 +209,10 @@
+ extern WINDOW *newwin ();
+
+ register char *cp; /* general purpose char ptr */
+- extern char *gets (); /* get string from stdin */
+ char m = '\017'; /* mask for hex edit */
+ char response[512]; /* general purpose buffer */
+ int z; /* character read in */
+
+- int breakp (); /* signal trapping function */
+ int c; /* current screen column */
+ int change = 0; /* true if cmd line option toggled */
+ int fid; /* file descriptor */
+@@ -235,7 +232,6 @@
+
+ extern long getnum ();
+ extern char *instr (); /* get a string from the cmd line */
+- extern int reset (); /* exit function - reset terminal */
+
+ /* ------------------------------------------------------------ */
+ /* set up signal handling */
+@@ -339,13 +335,13 @@
+ but it's good enough. -r$ */
+ raw();
+ #else /* use original code... */
+- ioctl (0, TCGETA, &asis);
++ tcgetattr (0, &asis);
+ aswas = asis; /* save termio stuff for later restore */
+ asis.c_cc[VINTR] = '\0';
+ asis.c_iflag &= ~IXON;
+ asis.c_iflag &= ~IXOFF;
+ asis.c_iflag &= ~IXANY;
+- ioctl (0, TCSETA, &asis);
++ tcsetattr (0, TCSANOW, &asis);
+ #endif /* MOD_HAX */
+ }
+
+@@ -478,7 +474,9 @@
+ }
+ pbrk = 0;
+ fprintf (stderr, "\007");
+- gets (response);
++ fgets (response, 512, stdin);
++ if ((cp = strchr (response, '\n')))
++ *cp = 0;
+
+ if (pbrk) status = EOF;
+ }
+@@ -832,7 +830,8 @@
+ touchwin (alphawin);
+ wrefresh (alphawin);
+
+- while ((z = wgetch (alphawin)) != DEL)
++ while ((z = wgetch (alphawin)) != KEY_DC &&
++ z != KEY_BACKSPACE)
+ {
+ if (!arrow (z, &r, &c))
+ {
+@@ -902,7 +901,8 @@
+ touchwin (hexwin);
+ wrefresh (hexwin);
+
+- while ((z = wgetch (hexwin)) != DEL)
++ while ((z = wgetch (hexwin)) != KEY_DC
++ && z != KEY_BACKSPACE)
+ {
+ if (!arrow (z, &r, &c))
+ {
+@@ -1281,7 +1281,7 @@
+ /*S breakp - set pbrk on interrupt */
+ /*H breakp */
+ /*E*/
+-int breakp (i)
++void breakp (i)
+ int i;
+ {
+ int s;
+@@ -1592,6 +1592,7 @@
+ /*S reset - reset terminal to original state */
+ /*H reset */
+ /*E*/
++void
+ reset (sig)
+ int sig;
+ {
+@@ -1600,7 +1601,7 @@
+ move (23, 0);
+ refresh ();
+ #ifndef MOD_HAX
+- ioctl (0, TCSETA, &aswas);
++ tcsetattr (0, TCSANOW, &aswas);
+ #endif
+ endwin ();
+ }
+@@ -1610,7 +1611,6 @@
+ fprintf (stderr, "killed with signal %d\n", sig);
+ exit (sig);
+ }
+- return (0);
+ }
+ /*S arrow - determine if current character is a cursor control key */
+ /*H arrow */
diff --git a/editors/bpatch/pkg-comment b/editors/bpatch/pkg-comment
new file mode 100644
index 000000000000..174a2d22e1f9
--- /dev/null
+++ b/editors/bpatch/pkg-comment
@@ -0,0 +1 @@
+bpatch - An hex editor that doesn't load the file at once.
diff --git a/editors/bpatch/pkg-descr b/editors/bpatch/pkg-descr
new file mode 100644
index 000000000000..5da94d59e944
--- /dev/null
+++ b/editors/bpatch/pkg-descr
@@ -0,0 +1,12 @@
+BPATCH.C
+Original code written by Garry M. Johnson and Steven Lisk.
+
+Neat code and program. Dump or edit files (binary or acsii), displayed
+by 256-byte records in side-by-side hex and ascii formats. Various
+other features (eg, toggled swap within byte pairs).
+
+Jörg's remark:
+
+The most interesting feature of this editor is that it doesn't load the
+entire file at once, unlike all other hex editors. Thus, you can browse
+and edit very large files or even raw disks.
diff --git a/editors/bpatch/pkg-plist b/editors/bpatch/pkg-plist
new file mode 100644
index 000000000000..232f36efe9d4
--- /dev/null
+++ b/editors/bpatch/pkg-plist
@@ -0,0 +1,2 @@
+bin/bpatch
+man/man1/bpatch.1.gz