Category : Linux Files
Archive   : BPE.ZIP
Filename : BPE.TAR

 
Output of file : BPE.TAR contained in archive : BPE.ZIP
./ 711 145 1 0 5233114554 10146 5ustar davidsenotherBPE2 600 145 1 32465 4404622632 10536 0ustar davidsenotherFrom uucp4 Mon Mar 6 19:03:56 1989
Received: by sixhub.UUCP (smail2.5)
id AA04971; 6 Mar 89 19:03:53 EST (Mon)
Received: by kbsvax.steinmetz (1.2/1.1x Steinmetz)
id AA08210; Mon, 6 Mar 89 17:47:29 est
Received: by ge-rtp.GE.COM.GE.COM (smail2.5)
id AA28152; 6 Mar 89 14:52:59 EST (Mon)
Received: by mcnc.mcnc.org (5.59/MCNC/5-16-88)
id AA29527; Mon, 6 Mar 89 13:52:10 EST
Received: from bellcore.UUCP by rutgers.edu (5.59/SMI4.0/RU1.1/3.03) with UUCP
id AA18714; Mon, 6 Mar 89 13:48:57 EST
Received: from wind.bellcore.com
by bellcore.bellcore.com (3.2/smail2.5/07-29-87)
id AA25898; Mon, 6 Mar 89 13:41:06 EST
Received: from uunet.UU.NET by wind.bellcore.com (5.58/1.1)
id AA14224; Mon, 6 Mar 89 13:39:03 EST
Received: from mcvax.UUCP by uunet.UU.NET (5.61/1.14) with UUCP
id AA00882; Mon, 6 Mar 89 04:34:40 -0500
Received: by mcvax.cwi.nl via EUnet; Mon, 6 Mar 89 10:32:07 +0100 (MET)
Received: by tuvie.uucp; Mon Mar 6 09:53:51 1989
Received: by mssx.UUCP (5.51/smail2.2/01-11-1988)
id AA07106; Mon, 6 Mar 89 09:46:34 GMT
From: steinmetz!mcnc!mcvax.cwi.nl!tuvie!mssx!src (Pleschutznig Andreas)
Message-Id: <[email protected]>
Subject: BPE
To: mcnc!ge-rtp!steinmetz!sixhub!davidsen
Date: Mon, 6 Mar 89 9:46:32 GMT
X-Mailer: Elm [version 2.1 PL1]
Status: OR


Tks for your work in making this program better. Due to a machine crash
I don't have the sources (and the time) to test your patches. Enclosed you'll
find the latest sources I've got on our machine, so please apply your patches
to these sources and release then to USENET.

You'll find that from the time you applied your patches the program has
got one more function (H) for Hex search

good luck
andy


#-----------------------Cut Here --------------------------
#The following is a shell Archive. To reconstruct the files in it
#type sh filename. Do not use Csh !!

echo x - bpe.c
sed 's/^X//' >bpe.c <<'*-*-END-of-bpe.c-*-*'
X
X/***************************************************************************
X
XVersion History:
X
XVer.No Comment By
X===========================================================================
X1.0 first version (seems to do things right) andy@mssx
X1.1 changed a few minor bugs in address(offset) [email protected]
X andy@mssx
X1.2 added code for hex search jon@jonlab
X
XI declare this program as freeware, i.e. you may duplicate it, give it
Xto your friends, and transfer it to any machine you like, as long as
Xyou do not change or delete the built in copyright message.
X
X Andreas Pleschutznig
X Teichhofweg 2
X 8044 Graz
X Austria
X
XComments and bug reports to:
X andy@mssx (mcvax!tuvie!mssx!andy)
X
X
X*****************************************************************************/
X
X
X#include
X#include
X#include
X
X#define BELL 0x07
X#define ASCX 63
X#define ASCY 6
X#define HEXY 6
X#define HEXX 12
X
Xint path; /* path to file to patch */
Xlong filpos; /* position in file */
Xunsigned char secbuf[256]; /* sector read buffer */
X
Xint donix(); /* default signal handling routine */
Xchar filename[60];
Xint length; /* length of read sector */
X
Xmain(argc,argv)
Xint argc;
Xchar *argv[];
X
X{
X if (argc != 2) {
X fprintf(stderr,"Usage: %s filename\n",argv[0]);
X exit(1);
X }
X if (( path = open(argv[1],O_RDWR)) == -1) {
X fprintf(stderr,"%s: Can't open '%s'\n",argv[0],argv[1]);
X exit(1);
X }
X sprintf(filename,"%s",argv[1]);
X initscr();
X refresh();
X signal(SIGINT,donix);
X signal(SIGQUIT,donix);
X cbreak(); /* set single char input */
X noecho();
X keypad(stdscr,TRUE);
X filpos = 0; /* set global position to 0 */
X length = 0;
X command();
X endwin();
X close(path);
X}
X
Xcommand()
X
X{
X int inval;
X
X header("BPE Version 1.2",filename,"(C) 1988 MSS Graz");
X inval = 0;
X while ((inval != 'q') && (inval != 'Q')) {
X move(2,0);
X mvprintw(2,0,"COMMAND : ");
X refresh();
X inval = getch();
X switch (inval) {
X case 'q':
X case 'Q':
X break;
X case '?':
X help();
X break;
X case 'h':
X case 'H':
X find_hex();
X dump();
X break;
X case 'f':
X case 'F':
X find_string();
X dump();
X break;
X case '+':
X case 'n':
X case 'N':
X filpos += 256;
X dump();
X break;
X case '-':
X case 'p':
X case 'P':
X filpos -= 256;
X if (filpos < 0)
X filpos = 0;
X dump();
X break;
X case 'D':
X case 'd':
X dump();
X break;
X case 's':
X case 'S':
X set();
X dump();
X break;
X case 'e':
X edit_ascii();
X break;
X case 'E':
X edit_hex();
X break;
X case 'w':
X case 'W':
X wrsec();
X break;
X default:
X werr("Invalid Command !");
X }
X }
X
X}
X
Xedit_ascii()
X{
X int inval = 0;
X int cury,curx;
X
X if (length == 0)
X length = dump();
X move(2,0);
X clrtoeol();
X printw("End editing with CNTRL-C");
X curx = cury = 0;
X while (inval != 0x03) {
X move(ASCY+cury,ASCX+curx);
X refresh();
X inval = getch();
X switch (inval) {
X case KEY_UP:
X if (cury)
X cury--;
X else
X beep();
X break;
X case KEY_DOWN:
X if (cury < 15)
X cury++;
X else
X beep();
X break;
X case KEY_RIGHT:
X if (curx < 15)
X curx++;
X else
X beep();
X break;
X case KEY_LEFT:
X if (curx)
X curx--;
X else
X beep();
X break;
X default:
X if ((inval >= 0x20) && (inval <= 0x7e)) {
X secbuf[cury*16+curx] =inval;
X curx++;
X if (curx > 15) {
X curx=0;
X cury++;
X }
X if (cury > 15)
X cury = 0;
X disp(length);
X }
X break;
X }
X }
X move(2,0);
X clrtoeol();
X}
X
Xgethex(cury,curx)
Xint cury,curx;
X{
X int val;
X int inlen;
X int value;
X
X inlen = 0;
X while (inlen < 2) {
X val = getch();
X if (val > 255)
X return(val);
X if (val < '0')
X return(-1);
X if (val > '9') val &= ~0x20;
X if (((val >= '0') && (val <='9')) ||
X ((val >= 'A') && (val <= 'F'))) {
X if (val <= '9')
X val -= '0';
X else
X val = val - 'A' + 0x0a;
X switch (inlen) {
X case 0:
X value = val << 4;
X secbuf[cury*16+curx] = value;
X disp(length);
X move(HEXY+cury,HEXX+curx*3+1);
X refresh();
X break;
X case 1:
X value += val ;
X break;
X }
X inlen++;
X }
X }
X return(value);
X}
X
Xedit_hex()
X{
X int inval = 0;
X int cury,curx;
X
X if (length == 0)
X length = dump();
X move(2,0);
X clrtoeol();
X printw("End editing with CNTRL-C");
X curx = cury = 0;
X while (inval != -1) {
X move(HEXY+cury,HEXX+curx*3);
X refresh();
X inval = gethex(cury,curx);
X switch (inval) {
X case KEY_UP:
X if (cury)
X cury--;
X else
X beep();
X break;
X case KEY_DOWN:
X if (cury < 15)
X cury++;
X else
X beep();
X break;
X case KEY_RIGHT:
X if (curx < 15)
X curx++;
X else
X beep();
X break;
X case KEY_LEFT:
X if (curx)
X curx--;
X else
X beep();
X break;
X default:
X if ((inval >= 0x00) && (inval <= 0xff)) {
X secbuf[cury*16+curx] =inval;
X curx++;
X if (curx > 15) {
X curx=0;
X cury++;
X }
X if (cury > 15)
X cury = 0;
X disp(length);
X }
X break;
X }
X }
X move(2,0);
X clrtoeol();
X}
X
Xfind_string()
X
X{
X int stlen;
X char string[60];
X int found;
X int searchpos;
X
X move(2,0);
X clrtoeol();
X printw("String to search : ");
X refresh();
X echo();
X getstr(string);
X noecho();
X move(2,0);
X clrtoeol();
X printw("Searching for '%s'",string);
X found = 0;
X searchpos = 1;
X stlen = strlen(string);
X while (found == 0) {
X while ((256 - searchpos) >= stlen) {
X if (testchar(secbuf+searchpos,string,stlen))
X searchpos++;
X else {
X filpos += searchpos;
X found = 1;
X break;
X }
X }
X if (found == 0) {
X filpos += searchpos;
X searchpos = 0;
X }
X if (rdsec() == 0) {
X found = 1;
X }
X refresh();
X }
X move (2,0);
X clrtoeol();
X}
X
Xtestchar(buffer,string,length)
Xchar *buffer;
Xchar *string;
Xint length;
X{
X register int i;
X
X i = 0;
X while ( i < length) {
X if (buffer[i] != string[i])
X break;
X i++;
X }
X if ( i == length)
X return(0);
X return(1);
X}
X
Xset()
X
X{
X echo();
X move(2,0);
X clrtoeol();
X printw("New File Position : ");
X refresh();
X scanw("%lx",&filpos);
X move(2,0);
X clrtoeol();
X noecho();
X}
X
Xdisp(length)
Xint length;
X{
X int i,j;
X
X mvprintw(4,0," ADDRESS ");
X for (i = 0, j = filpos % 16; i < 16; i++, j++)
X printw(" %02X", j % 16);
X printw(" ASCII");
X mvprintw(5,0,"===============================================================================");
X for ( i = 0, j = 0; i < 16; i++, j = 0) {
X mvprintw(ASCY+i,0,"%08lX",filpos+i*16+j);
X for (j = 0; j < 16; j++) {
X if (( i*16 + j ) >= length) {
X clrtoeol();
X goto Disp1;
X }
X mvprintw(ASCY+i,HEXX+j*3,"%02X",secbuf[i*16+j] & 0xFF);
X }
XDisp1:
X for (j = 0; j < 16; j++) {
X if (( i*16 + j ) >= length) {
X clrtobot();
X goto Disp2;
X }
X if (secbuf[i*16+j] >= ' ')
X mvprintw(ASCY+i,ASCX+j,"%c",secbuf[i*16+j]);
X else
X mvprintw(ASCY+i,ASCX+j,".");
X }
X }
XDisp2:
X refresh();
X}
X
X
Xdump()
X
X{
X int i,j;
X
X length = rdsec();
X disp(length);
X return(length);
X}
X
Xrdsec()
X
X{
X mvprintw(2,55,"Rel. Position : %08lX",filpos);
X lseek(path,filpos,0);
X length = read(path,secbuf,256);
X return(length);
X}
X
Xwrsec()
X{
X lseek(path,filpos,0);
X write(path,secbuf,length);
X move(2,0);
X printw(" ");
X printw("Sector written!");
X beep();
X printw(" ");
X refresh();
X}
X
Xhelp()
X
X{
X WINDOW *win;
X
X win = newwin(0,0,0,0);
X wclear(win);
X mvwprintw(win,3,10,"Valid Commands are :");
X mvwprintw(win,5,15,"D - Dump one page from current file position");
X mvwprintw(win,6,15,"S - Set current file pointer");
X mvwprintw(win,7,15,"F - Find string in file (beginning from curr. position)");
X mvwprintw(win,8,15,"H - Find hex string in file (beginnig from current position)");
X mvwprintw(win,9,15,"+ - Display next sector");
X mvwprintw(win,10,15,"N - Display next sector");
X mvwprintw(win,11,15,"- - Display previous sector");
X mvwprintw(win,12,15,"P - Display previous sector");
X mvwprintw(win,19,15,"Q - Quit Program");
X mvwprintw(win,13,15,"e - Edit ASCII portion of file");
X mvwprintw(win,14,15,"E - Edit binary portion of file");
X mvwprintw(win,15,15,"W - Write modified sector back to disk");
X mvwprintw(win,20,20,"Continue with any char.");
X wrefresh(win);
X getch();
X delwin(win);
X touchwin(stdscr);
X refresh();
X}
X
Xwerr(errstr)
Xchar *errstr;
X
X{
X beep();
X move(LINES-1,0);
X printw("%s",errstr);
X refresh();
X sleep(2);
X move(LINES-1,0);
X clrtoeol();
X refresh();
X}
X
X
X
Xheader(left,mid,right)
Xchar *left;
Xchar *mid;
Xchar *right;
X
X{
X mvprintw(0,0,"%s",left);
X mvprintw(0,79-strlen(right),"%s",right);
X mvprintw(0,40-strlen(mid)/2,"%s",mid);
X}
X
Xdonix(sig)
Xint sig;
X
X{
X signal(sig,donix);
X}
X
*-*-END-of-bpe.c-*-*
echo x - hexsrch.c
sed 's/^X//' >hexsrch.c <<'*-*-END-of-hexsrch.c-*-*'
X
X/* Added by Jon LaBadie [email protected]
X to implement the H (hex search) option */
X
X#include
X#include
X
X/*
X** hex_2_byte returns the integer value of a byte
X** represented by the two characters passed to it.
X** For example, passed an '8' and an 'A', it will
X** return 170 (8 * 16 + 10). Returns -1 on any error.
X*/
X
Xint
Xhex_2_byte(a, b)
Xchar a, b;
X{
X int v = 0;
X
X if (!isxdigit(a) || !isxdigit(b))
X return -1;
X
X a = toupper(a);
X b = toupper(b);
X
X if (isdigit(a))
X v = (a - '0') * 16;
X else
X v = (a - 'A' + 10) * 16;
X
X if (isdigit(b))
X v += (b - '0');
X else
X v += (b - 'A' + 10);
X
X return v;
X}
X
X
X/* Take two strings as arguments.
X** First is a sequence of hex digit pairs.
X** Each pair is to be converted into the
X** equivalent unsigned 1 byte value and
X** stored in the second array.
X*/
X
Xint
Xcvt_str(s, h)
Xchar *s;
Xunsigned char *h;
X{
X int c;
X int len = 0;
X
X while(*s != '\0')
X {
X if (*(s+1) == '\0')
X return -1;
X c = hex_2_byte(*s, *(s+1));
X if (c >= 0)
X *h++ = c;
X else
X return -1;
X len++;
X s += 2;
X }
X *h = '\0';
X return len;
X}
X
Xfind_hex()
X{
X int stlen;
X char string[60];
X unsigned char hexstr[30];
X unsigned char *up;
X int found;
X int searchpos;
X extern char secbuf[];
X extern long filpos;
X
X move(2,0);
X clrtoeol();
X printw("HEX string to search for: ");
X refresh();
X echo();
X string[0] = '0';
X getstr(&string[1]);
X noecho();
X move(2,0);
X clrtoeol();
X if (strlen(string) % 2)
X stlen = cvt_str(&string[1], hexstr);
X else
X stlen = cvt_str(&string[0], hexstr);
X if (stlen < 0)
X {
X printw("Invalid Hex string: %s", &string[1]);
X refresh();
X sleep(1);
X return;
X }
X printw("Searching for '%s'",&string[1]);
X refresh();
X found = 0;
X searchpos = 1;
X while (found == 0) {
X while ((256 - searchpos) >= stlen) {
X if (secbuf[searchpos] != hexstr[0] || memcmp(secbuf + searchpos + 1, hexstr + 1, stlen - 1))
X searchpos++;
X else {
X filpos += searchpos;
X found = 1;
X break;
X }
X }
X if (found == 0) {
X filpos += searchpos;
X searchpos = 0;
X }
X if (rdsec() == 0) {
X found = 1;
X }
X refresh();
X }
X move (2,0);
X clrtoeol();
X}
*-*-END-of-hexsrch.c-*-*
echo x - makefile
sed 's/^X//' >makefile <<'*-*-END-of-makefile-*-*'
XCFLAGS = -O
XLIBES = -lcurses
XOBJS = bpe.o hexsrch.o
XSRCS = bpe.c hexsrch.c
XEXEC = bpe
X
X$(EXEC): $(OBJS)
X cc $(OBJS) -o $(EXEC) $(LIBES)
X
X$(OBJS):
X cc -c $(CFLAGS) $(<)
*-*-END-of-makefile-*-*
exit

bpe.1 600 145 1 6443 4404640020 10717 0ustar davidsenother.TH BPE 1 LOCAL
.SH NAME
\fBbpe\fR - examine and patch binary files
.SH SYNOPSIS
\fBbpe\fR allows a file to be searched and modified in either ASCII or
hexadecimal. Each buffer is displayed in both modes.
.SH DESCRIPTION
bpe binary.file
.ne 15
.SS Commands
.nf
D - Dump one page from current file position
S - Set current file pointer
F - Find string in file (beginning from curr. position)
/ - Same as F
H - locate hex bytes in file (beginning from curr. position)
N - Display next sector
P - Display previous sector
+ - Scroll forward 2 lines
- - Scroll back 2 lines
e - Edit ASCII portion of file
E - Edit binary portion of file
W - Write modified sector back to disk
Q - Quit Program
? - help
.fi
.ne 5
.SS Editing a file
Enter an editing mode by typing 'e' (for ASCII edit) or 'E' for hex
edit. The cursor may be moved either by the arrow keys or the vi-style
^H, ^J, ^K, ^L keys, depending on compilation options. Place the cursor
on the byte to change and type either a printing ASCII character or two
digit hex value. Exit either edit mode by typing ^E. When you are
satisfied with your editing, enter the W command to write the modified
portion of the file back to disk.
.ne 5
.SS Searching for data
You may search for hex data by giving the h command and entering a
string of hex digits. The search procedes forward from the current
location until a matching string is found. The display is adjusted to
put the first byte at the top of the screen (but see configuration
options). If no pattern is specified the previous pattern is used.
.P
To search for a string, enter the F (for find) command, or the vi style
/ command. At the prompt type in a string and press return. The search
procedes as with a hex byte search. If you wish to repeat a string
search, enter the F command again and press return. This will repeat the
search for the previous string. If the starting position has not been
adjusted the search will start one character past the location of the
last occurence found.
.SS Configuration options
The makefile contains configuration option, identifiable by comments.
These are all at the top of the makefile. If your curses supports KEYPAD
definition for your terminal, you may use the cursor keys on the keypad.
This is generally only found in SysV systems with termlib versions of
curses. If you don't have that feature the NOKEYPAD option will allow
use of vi style cursor keys.
.P
When searching, if you prefer to see the pattern in context you may set
the CLINES to the number of lines of context displayed before the
pattern found. This may cause problems doing hex searches. In addition,
if you want the display to start on a 16 byte boundary, to match od or
hd output, you may enable the ALLIGN option.
.SH WARNINGS
Illegal commands are flagged as such.
.SH SEE ALSO
od, hd, possibly adb.
.SH DIAGNOSTICS
.SH LIMITATIONS
If the l or L commands are used with no pattern specified before a
pattern has been specified the value zero will be used.
.ne 15
.SH AUTHOR
.nf
Original author:
Andreas Pleschutznig
Teichhofweg 2
8044 Graz
Austria
Contributions by:
[email protected]
v1.2 features added by:
Bill Davidsen, Box 8 KW-C206, Schenectady NY 12345

Comments and bug reports to:
andy@mssx (mcvax!tuvie!mssx!andy)
Bugs in features documented as being added in v1.2 to
[email protected] (uunet!crd.ge.com!davidsen)
.fi
bpe.1.1 600 145 1 21575 4403012566 11110 0ustar davidsenother

********
bpe.c
********
/***************************************************************************

Version History:

Ver.No Comment By
===========================================================================
1.0 first version (seems to do things right) andy@mssx
1.1 some bugs fixed (tks to Maarten) [email protected]
[email protected]

BUG REPORTS:
============
- The offset count in the first column is wrong,
except for the first line; it's 0x10 too high.
(fixed)
- The test in disp() if a char is printable, fails
for chars >= 0177.
(fixed)

- Help message for 'H' incorrect (fixed)


I declare this program as freeware, i.e. you may duplicate it, give it
to your friends, and transfer it to any machine you like, as long as
you do not change or delete the build in copyright message.

Andreas Pleschutznig
Teichhofweg 2
8044 Graz
Austria

Comments and bug reports to:
andy@mssx (mcvax!tuvie!mssx!andy)


*****************************************************************************/


#include
#include
#include

#define CTRL(c) ((c) ^ 0100)
#define DEL CTRL('?')

#ifdef NOKEYPAD
#define KEY_LEFT CTRL('H')
#define KEY_DOWN CTRL('J')
#define KEY_UP CTRL('K')
#define KEY_RIGHT CTRL('L')
#define O_RDWR 2
#define cbreak() crmode()
#define beep() putchar(7)
#endif

#define BELL 0x07
#define ASCX 63
#define ASCY 6
#define HEXY 6
#define HEXX 12

int path; /* path to file to patch */
long filpos; /* position in file */
char secbuf[256]; /* sector read buffer */

int donix(); /* default signal handling routine */
char filename[60];
int length; /* length of read sector */

main(argc,argv)
int argc;
char **argv;
{
if (argc != 2) {
fprintf(stderr,"Usage: %s filename\n",argv[0]);
exit(1);
}
if (( path = open(argv[1],O_RDWR)) == -1) {
fprintf(stderr,"%s: Can't open '%s'\n",argv[0],argv[1]);
exit(1);
}
sprintf(filename,"%s",argv[1]);
initscr();
refresh();
signal(SIGINT,donix);
signal(SIGQUIT,donix);
cbreak(); /* set single char input */
noecho();
#ifndef NOKEYPAD
keypad(stdscr,TRUE);
#endif
filpos = 0; /* set global position to 0 */
length = 0;
command();
clear();
refresh();
endwin();
close(path);
}

command()
{
int inval;

header("BPE Version 1.1",filename,"(C) 1988 MSS Graz");
inval = 0;
while ((inval != 'q') && (inval != 'Q')) {
move(2,0);
mvprintw(2,0,"COMMAND : ");
refresh();
inval = getch();
switch (inval) {
case 'q':
case 'Q':
break;
case 'h':
case 'H':
case '?':
help();
break;
case 'f':
case 'F':
case '/':
find_string();
dump();
break;
case '+':
case 'n':
case 'N':
filpos += 256;
dump();
break;
case '-':
case 'p':
case 'P':
filpos -= 256;
if (filpos < 0)
filpos = 0;
dump();
break;
case 'D':
case 'd':
dump();
break;
case 's':
case 'S':
set();
dump();
break;
case 'e':
edit_ascii();
break;
case 'E':
edit_hex();
break;
case 'w':
case 'W':
wrsec();
break;
default:
werr("Invalid Command !");
}
}
}

edit_ascii()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
#else
printw("End editing with CNTRL-C");
#endif
curx = cury = 0;
while (inval != 0x03) {
move(ASCY+cury,ASCX+curx);
refresh();
inval = getch();
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
default:
if ((inval >= 0x20) && (inval <= 0x7e)) {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
break;
}
}
move(2,0);
clrtoeol();
}

gethex(cury,curx)
int cury,curx;
{
int val;
int inlen;
int value;

inlen = 0;
while (inlen < 2) {
val = getch();
if (val > 255)
return(val);
if (val < '0')
return(-1);
if (val > '9') val &= ~0x20;
if (((val >= '0') && (val <='9')) ||
((val >= 'A') && (val <= 'F'))) {
if (val <= '9')
val -= '0';
else
val = val - 'A' + 0x0a;
switch (inlen) {
case 0:
value = val << 4;
secbuf[cury*16+curx] = value;
disp(length);
move(HEXY+cury,HEXX+curx*3+1);
refresh();
break;
case 1:
value += val ;
break;
}
inlen++;
}
}
return(value);
}

edit_hex()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
#else
printw("End editing with CNTRL-C");
#endif
curx = cury = 0;
while (inval != -1) {
move(HEXY+cury,HEXX+curx*3);
refresh();
inval = gethex(cury,curx);
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
default:
if ((inval >= 0x00) && (inval <= 0xff)) {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
break;
}
}
move(2,0);
clrtoeol();
}

find_string()
{
int stlen;
char string[60];
int found;
int searchpos;

move(2,0);
clrtoeol();
printw("String to search : ");
refresh();
echo();
getstr(string);
noecho();
move(2,0);
clrtoeol();
printw("Searching for '%s'",string);
found = 0;
searchpos = 0;
stlen = strlen(string);
while (found == 0) {
while ((256 - searchpos) >= stlen) {
if (testchar(secbuf+searchpos,string,stlen))
searchpos++;
else {
filpos += searchpos;
found = 1;
break;
}
}
if (found == 0) {
filpos += searchpos;
searchpos = 0;
}
if (rdsec() == 0) {
found = 1;
}
refresh();
}
move(2, 0);
clrtoeol();
}

testchar(buffer,string,length)
char *buffer;
char *string;
int length;
{
register int i;

i = 0;
while ( i < length) {
if (buffer[i] != string[i])
break;
i++;
}
if ( i == length)
return(0);
return(1);
}

set()
{
echo();
move(2,0);
clrtoeol();
printw("New File Position : ");
refresh();
scanw("%lx",&filpos);
move(2,0);
clrtoeol();
noecho();
}

disp(length)
int length;
{
int i, j, c;

j = 0;

mvprintw(4,0,
" ADDRESS 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ASCII");

mvprintw(5,0, "=======================================================\
========================");

for ( i = 0; i < 16; i++) {
mvprintw(ASCY+i,0,"%08lX",filpos+i*16);
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtoeol();
goto Disp1;
}
mvprintw(ASCY+i,HEXX+j*3,"%02X",secbuf[i*16+j] & 0xFF);
}
Disp1:
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtobot();
goto Disp2;
}
if (' ' <= (c = secbuf[i * 16 + j]) && c < DEL)
mvprintw(ASCY+i,ASCX+j,"%c", c);
else
mvprintw(ASCY+i,ASCX+j,".");
}
}
Disp2:
refresh();
}


dump()
{
int i,j;

length = rdsec();
disp(length);
return(length);
}

rdsec()
{
mvprintw(2,55,"Rel. Position : %08lX",filpos);
lseek(path,filpos,0);
length = read(path,secbuf,256);
return(length);
}

wrsec()
{
lseek(path,filpos,0);
write(path,secbuf,length);
}

help()
{
WINDOW *win;

win = newwin(0,0,0,0);
wclear(win);
mvwprintw(win,3,10,"Valid Commands are :");
mvwprintw(win,5,15,"D - Dump one page from current file position");
mvwprintw(win,6,15,"S - Set current file pointer");
mvwprintw(win,7,15,
"F - Find string in file (beginning from curr. position)");
mvwprintw(win,8,15,"/ - Idem");
mvwprintw(win,9,15,"+ - Display next sector");
mvwprintw(win,10,15,"N - Display next sector");
mvwprintw(win,11,15,"- - Display previous sector");
mvwprintw(win,12,15,"P - Display previous sector");
mvwprintw(win,13,15,"e - Edit ASCII portion of file");
mvwprintw(win,14,15,"E - Edit binary portion of file");
mvwprintw(win,15,15,"W - Write modified sector back to disk");
mvwprintw(win,18,15,"Q - Quit Program");
mvwprintw(win,20,20,"Continue with any char.");
wrefresh(win);
getch();
delwin(win);
touchwin(stdscr);
refresh();
}

werr(errstr)
char *errstr;

{
beep();
move(LINES-1,0);
printw("%s",errstr);
refresh();
sleep(2);
move(LINES-1,0);
clrtoeol();
refresh();
}



header(left,mid,right)
char *left;
char *mid;
char *right;

{
mvprintw(0,0,"%s",left);
mvprintw(0,79-strlen(right),"%s",right);
mvprintw(0,40-strlen(mid)/2,"%s",mid);
}

donix(sig)
int sig;

{
signal(sig,donix);
}

bpe.1.1a 600 145 1 23202 4402767220 11241 0ustar davidsenother/***************************************************************************

Version History:

Ver.No Comment By
===========================================================================
1.0 first version (seems to do things right) andy@mssx
1.1 some bugs fixed (tks to Maarten) [email protected]
[email protected]

BUG REPORTS:
============
- The offset count in the first column is wrong,
except for the first line; it's 0x10 too high.
(fixed)
- The test in disp() if a char is printable, fails
for chars >= 0177.
(fixed)

- Help message for 'H' incorrect (fixed)


I declare this program as freeware, i.e. you may duplicate it, give it
to your friends, and transfer it to any machine you like, as long as
you do not change or delete the build in copyright message.

Andreas Pleschutznig
Teichhofweg 2
8044 Graz
Austria

Comments and bug reports to:
andy@mssx (mcvax!tuvie!mssx!andy)


*****************************************************************************/


#include
#include
#include

#define CTRL(c) ((c) ^ 0100)
#define DEL CTRL('?')

#ifdef NOKEYPAD
#define KEY_LEFT CTRL('H')
#define KEY_DOWN CTRL('J')
#define KEY_UP CTRL('K')
#define KEY_RIGHT CTRL('L')
#ifndef O_RDWR
#define O_RDWR 2
#endif
#define cbreak() crmode()
#define beep() putchar(7)
#endif

#define BELL 0x07
#define ASCX 63
#define ASCY 6
#define HEXY 6
#define HEXX 12

int path; /* path to file to patch */
long filpos; /* position in file */
char secbuf[256]; /* sector read buffer */

int donix(); /* default signal handling routine */
char filename[60];
int length; /* length of read sector */

main(argc,argv)
int argc;
char **argv;
{
if (argc != 2) {
fprintf(stderr,"Usage: %s filename\n",argv[0]);
exit(1);
}
if (( path = open(argv[1],O_RDWR)) == -1) {
fprintf(stderr,"%s: Can't open '%s'\n",argv[0],argv[1]);
exit(1);
}
sprintf(filename,"%s",argv[1]);
initscr();
refresh();
signal(SIGINT,donix);
signal(SIGQUIT,donix);
cbreak(); /* set single char input */
noecho();
#ifndef NOKEYPAD
keypad(stdscr,TRUE);
#endif
filpos = 0; /* set global position to 0 */
length = 0;
command();
clear();
refresh();
endwin();
close(path);
}

command()
{
int inval;

header("BPE Version 1.1",filename,"(C) 1988 MSS Graz");
inval = 0;
while ((inval != 'q') && (inval != 'Q')) {
move(2,0);
mvprintw(2,0,"COMMAND : ");
refresh();
inval = getch();
switch (inval) {
case 'q':
case 'Q':
break;
case 'h':
case 'H':
case '?':
help();
break;
case 'f':
case 'F':
case '/':
find_string();
dump();
break;
case 'l':
case 'L':
find_byte();
dump();
break;
case '+':
filpos += 32;
dump();
break;
case 'n':
case 'N':
filpos += 256;
dump();
break;
case '-':
filpos -= 32;
dump();
break;
case 'p':
case 'P':
filpos -= 256;
if (filpos < 0)
filpos = 0;
dump();
break;
case 'D':
case 'd':
dump();
break;
case 's':
case 'S':
set();
dump();
break;
case 'e':
edit_ascii();
break;
case 'E':
edit_hex();
break;
case 'w':
case 'W':
wrsec();
break;
default:
werr("Invalid Command !");
}
}
}

edit_ascii()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
#else
printw("End editing with CNTRL-C");
#endif
curx = cury = 0;
while (inval != 0x03) {
move(ASCY+cury,ASCX+curx);
refresh();
inval = getch();
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
default:
if ((inval >= 0x20) && (inval <= 0x7e)) {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
break;
}
}
move(2,0);
clrtoeol();
}

gethex(cury,curx)
int cury,curx;
{
int val;
int inlen;
int value;

inlen = 0;
while (inlen < 2) {
val = getch();
if (val > 255)
return(val);
if (val < '0')
return(-1);
if (val > '9') val &= ~0x20;
if (((val >= '0') && (val <='9')) ||
((val >= 'A') && (val <= 'F'))) {
if (val <= '9')
val -= '0';
else
val = val - 'A' + 0x0a;
switch (inlen) {
case 0:
value = val << 4;
secbuf[cury*16+curx] = value;
disp(length);
move(HEXY+cury,HEXX+curx*3+1);
refresh();
break;
case 1:
value += val ;
break;
}
inlen++;
}
}
return(value);
}

edit_hex()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
#else
printw("End editing with CNTRL-C");
#endif
curx = cury = 0;
while (inval != -1) {
move(HEXY+cury,HEXX+curx*3);
refresh();
inval = gethex(cury,curx);
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
default:
if ((inval >= 0x00) && (inval <= 0xff)) {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
break;
}
}
move(2,0);
clrtoeol();
}

find_string()
{
int stlen;
char string[60];
int found;
int searchpos;

move(2,0);
clrtoeol();
printw("String to search : ");
refresh();
echo();
getstr(string);
noecho();
move(2,0);
clrtoeol();
printw("Searching for '%s'",string);
found = 0;
searchpos = 0;
stlen = strlen(string);
while (found == 0) {
while ((256 - searchpos) >= stlen) {
if (testchar(secbuf+searchpos,string,stlen))
searchpos++;
else {
filpos += searchpos;
found = 1;
break;
}
}
if (found == 0) {
filpos += searchpos;
searchpos = 0;
}
if (rdsec() == 0) {
found = 1;
}
refresh();
}
move(2, 0);
clrtoeol();
}

find_byte()
{
char string[80];
int srchbyte;
int found;
int searchpos;

move(2,0);
clrtoeol();
printw("Enter byte to find (hex) : ");
refresh();
echo();
getstr(string);
noecho();
move(2,0);
clrtoeol();
printw("Searching for '%s'",string);
sscanf(string, "%2x", &srchbyte);
found = 0;
while (found == 0) {
for (searchpos = 0; searchpos < 256; ++searchpos) {
if (srchbyte == secbuf[searchpos]) {
found = 1;
break;
}
}
filpos += searchpos;
if (rdsec() == 0) break;
}
move(2, 0);
clrtoeol();
refresh();
}

testchar(buffer,string,length)
char *buffer;
char *string;
int length;
{
register int i;

i = 0;
while ( i < length) {
if (buffer[i] != string[i])
break;
i++;
}
if ( i == length)
return(0);
return(1);
}

set()
{
echo();
move(2,0);
clrtoeol();
printw("New File Position : ");
refresh();
scanw("%lx",&filpos);
move(2,0);
clrtoeol();
noecho();
}

disp(length)
int length;
{
int i, j, c;

j = 0;

mvprintw(4,0,
" ADDRESS 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ASCII");

mvprintw(5,0, "=======================================================\
========================");

for ( i = 0; i < 16; i++) {
mvprintw(ASCY+i,0,"%08lX",filpos+i*16);
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtoeol();
goto Disp1;
}
mvprintw(ASCY+i,HEXX+j*3,"%02X",secbuf[i*16+j] & 0xFF);
}
Disp1:
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtobot();
goto Disp2;
}
if (' ' <= (c = secbuf[i * 16 + j]) && c < DEL)
mvprintw(ASCY+i,ASCX+j,"%c", c);
else
mvprintw(ASCY+i,ASCX+j,".");
}
}
Disp2:
refresh();
}


dump()
{
int i,j;

length = rdsec();
disp(length);
return(length);
}

rdsec()
{
mvprintw(2,55,"Rel. Position : %08lX",filpos);
lseek(path,filpos,0);
length = read(path,secbuf,256);
return(length);
}

wrsec()
{
lseek(path,filpos,0);
write(path,secbuf,length);
}

help()
{
WINDOW *win;

win = newwin(0,0,0,0);
wclear(win);
mvwprintw(win,3,10,"Valid Commands are :");
mvwprintw(win,5,15,"D - Dump one page from current file position");
mvwprintw(win,6,15,"S - Set current file pointer");
mvwprintw(win,7,15,
"F - Find string in file (beginning from curr. position)");
mvwprintw(win,8,15,
"L - locate byte in file (beginning from curr. position)");
mvwprintw(win,9,15,"/ - Idem");
mvwprintw(win,10,15,"+ - Scroll forward 2 lines");
mvwprintw(win,11,15,"N - Display next sector");
mvwprintw(win,12,15,"- - Scroll back 2 lines");
mvwprintw(win,13,15,"P - Display previous sector");
mvwprintw(win,14,15,"e - Edit ASCII portion of file");
mvwprintw(win,15,15,"E - Edit binary portion of file");
mvwprintw(win,16,15,"W - Write modified sector back to disk");
mvwprintw(win,18,15,"Q - Quit Program");
mvwprintw(win,20,20,"Continue with any char.");
wrefresh(win);
getch();
delwin(win);
touchwin(stdscr);
refresh();
}

werr(errstr)
char *errstr;

{
beep();
move(LINES-1,0);
printw("%s",errstr);
refresh();
sleep(2);
move(LINES-1,0);
clrtoeol();
refresh();
}



header(left,mid,right)
char *left;
char *mid;
char *right;

{
mvprintw(0,0,"%s",left);
mvprintw(0,79-strlen(right),"%s",right);
mvprintw(0,40-strlen(mid)/2,"%s",mid);
}

donix(sig)
int sig;

{
signal(sig,donix);
}

bpe.1.1b 600 145 1 24616 4403007572 11252 0ustar davidsenother/***************************************************************************

Version History:

Ver.No Comment By
===========================================================================
1.0 first version (seems to do things right) andy@mssx
1.1 some bugs fixed (tks to Maarten) [email protected]
[email protected]
1.2 works with NOKEYPAD in all cases [email protected]
make + and - move in 2 line increments
add 'L' look for hex byte

BUG REPORTS:
============
- The offset count in the first column is wrong,
except for the first line; it's 0x10 too high.
(fixed)
- The test in disp() if a char is printable, fails
for chars >= 0177.
(fixed)

- Help message for 'H' incorrect (fixed)


I declare this program as freeware, i.e. you may duplicate it, give it
to your friends, and transfer it to any machine you like, as long as
you do not change or delete the build in copyright message.

Andreas Pleschutznig
Teichhofweg 2
8044 Graz
Austria

Comments and bug reports to:
andy@mssx (mcvax!tuvie!mssx!andy)


*****************************************************************************/


#include
#include
#include
#include

#define CTRL(c) ((c) & 037)
#define DEL '\177'

#ifdef NOKEYPAD
#define KEY_LEFT CTRL('H')
#define KEY_DOWN CTRL('J')
#define KEY_UP CTRL('K')
#define KEY_RIGHT CTRL('L')
#ifndef O_RDWR
#define O_RDWR 2
#endif
#define cbreak() crmode()
#define beep() putchar(7)
#endif

#define BELL 0x07
#define ASCX 63
#define ASCY 6
#define HEXY 6
#define HEXX 12

int path; /* path to file to patch */
long filpos; /* position in file */
char secbuf[256]; /* sector read buffer */

int donix(); /* default signal handling routine */
char filename[60];
int length; /* length of read sector */

main(argc,argv)
int argc;
char **argv;
{
if (argc != 2) {
fprintf(stderr,"Usage: %s filename\n",argv[0]);
exit(1);
}
if (( path = open(argv[1],O_RDWR)) == -1) {
fprintf(stderr,"%s: Can't open '%s'\n",argv[0],argv[1]);
exit(1);
}
sprintf(filename,"%s",argv[1]);
initscr();
refresh();
signal(SIGINT,donix);
signal(SIGQUIT,donix);
cbreak(); /* set single char input */
noecho();
#ifndef NOKEYPAD
keypad(stdscr,TRUE);
#endif
filpos = 0; /* set global position to 0 */
length = 0;
command();
clear();
refresh();
endwin();
close(path);
}

command()
{
int inval;

header("BPE Version 1.2",filename,"(C) 1988 MSS Graz");
inval = 0;
while ((inval != 'q') && (inval != 'Q')) {
move(2,0);
mvprintw(2,0,"COMMAND : ");
refresh();
inval = getch();
switch (inval) {
case 'q':
case 'Q':
break;
case 'h':
case 'H':
case '?':
help();
break;
case 'f':
case 'F':
case '/':
find_string();
dump();
break;
case 'l':
case 'L':
find_byte();
dump();
break;
case '+':
filpos += 32;
dump();
break;
case 'n':
case 'N':
filpos += 256;
dump();
break;
case '-':
filpos -= 32;
dump();
break;
case 'p':
case 'P':
filpos -= 256;
if (filpos < 0)
filpos = 0;
dump();
break;
case 'D':
case 'd':
dump();
break;
case 's':
case 'S':
set();
dump();
break;
case 'e':
edit_ascii();
break;
case 'E':
edit_hex();
break;
case 'w':
case 'W':
wrsec();
break;
default:
werr("Invalid Command !");
}
}
}

edit_ascii()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
#else
printw("End editing with CNTRL-C");
#endif
curx = cury = 0;
while (inval != 0x03) {
move(ASCY+cury,ASCX+curx);
refresh();
inval = getch();
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
default:
if ((inval >= 0x20) && (inval <= 0x7e)) {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
break;
}
}
move(2,0);
clrtoeol();
}

gethex(cury,curx)
int cury,curx;
{
int val;
int inlen;
int value;
char *hexvals = "0123456789ABCDEF";
char *strchr(), *wkptr;

inlen = 0;
while (inlen < 2) {
val = getch();
if (islower(val)) val = toupper(val);
wkptr = strchr(hexvals, val);
if (wkptr == NULL) {
if (val > 255)
return(val);
else return(val|0x200);
}
else val = wkptr - hexvals;
switch (inlen) {
case 0:
value = val << 4;
secbuf[cury*16+curx] = value;
disp(length);
move(HEXY+cury,HEXX+curx*3+1);
refresh();
break;
case 1:
value += val ;
break;
}
inlen++;
}
return(value);
}

edit_hex()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
#else
printw("End editing with CNTRL-C");
#endif
curx = cury = 0;
while (inval != -1) {
move(HEXY+cury,HEXX+curx*3);
refresh();
inval = gethex(cury,curx);
if (inval > 0xff) {
#ifdef NOKEYPAD
inval &= 0xff;
#endif /* NOKEYPAD */
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
case CTRL('c'):
inval = -1;
break;
}
}
else {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
}
move(2,0);
clrtoeol();
}

find_string()
{
int stlen;
char string[60];
static char laststring[60];
static int re_search = 0, old_filpos;
int found;
int searchpos;

move(2,0);
clrtoeol();
printw("String to search : ");
refresh();
echo();
getstr(string);
if (strlen(string) == 0) {
if (strlen(laststring) > 0)
strcpy(string, laststring);
else {
beep();
return;
}
}
else {
strcpy(laststring, string);
}
noecho();
move(2,0);
clrtoeol();
printw("Searching for '%s'",string);
found = 0;
searchpos = (filpos == old_filpos ? re_search : 0);
stlen = strlen(string);
while (found == 0) {
while ((256 - searchpos) >= stlen) {
if (testchar(secbuf+searchpos,string,stlen))
searchpos++;
else {
filpos += searchpos;
old_filpos = filpos;
#ifdef CLINES
filpos -= 16*CLINES;
#endif /* context lines */
#ifdef ALLIGN
filpos &= ~0xf;
#endif /* allign */
re_search = old_filpos - filpos + 1;
old_filpos = filpos;
found = 1;
break;
}
}
if (found == 0) {
filpos += searchpos;
searchpos = 0;
}
if (rdsec() == 0) {
found = 1;
}
refresh();
}
move(2, 0);
clrtoeol();
}

find_byte()
{
char string[80];
int srchbyte;
int found;
int searchpos;

move(2,0);
clrtoeol();
printw("Enter byte to find (hex) : ");
refresh();
echo();
getstr(string);
noecho();
move(2,0);
clrtoeol();
printw("Searching for '%s'",string);
sscanf(string, "%2x", &srchbyte);
found = 0;
while (found == 0) {
for (searchpos = 0; searchpos < 256; ++searchpos) {
if (srchbyte == secbuf[searchpos]) {
found = 1;
break;
}
}
filpos += searchpos;
#ifdef CLINES
filpos -= 16*CLINES;
#endif /* contest */
#ifdef ALLIGN
filpos &= ~0xf;
#endif /* allign */
if (rdsec() == 0) break;
}
move(2, 0);
clrtoeol();
refresh();
}

testchar(buffer,string,length)
char *buffer;
char *string;
int length;
{
register int i;

i = 0;
while ( i < length) {
if (buffer[i] != string[i])
break;
i++;
}
if ( i == length)
return(0);
return(1);
}

set()
{
echo();
move(2,0);
clrtoeol();
printw("New File Position : ");
refresh();
scanw("%lx",&filpos);
move(2,0);
clrtoeol();
noecho();
}

disp(length)
int length;
{
int i, j, c;

j = 0;

mvprintw(4,0,"%s%s",
" ADDRESS 00 01 02 03 04 05 06 07 08 ",
"09 0A 0B 0C 0D 0E 0F ASCII");

mvprintw(5,0, "%s%s",
"=======================================",
"========================================");

for ( i = 0; i < 16; i++) {
mvprintw(ASCY+i,0,"%08lX",filpos+i*16);
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtoeol();
goto Disp1;
}
mvprintw(ASCY+i,HEXX+j*3,"%02X",secbuf[i*16+j] & 0xFF);
}
Disp1:
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtobot();
goto Disp2;
}
if (' ' <= (c = secbuf[i * 16 + j]) && c < DEL)
mvprintw(ASCY+i,ASCX+j,"%c", c);
else
mvprintw(ASCY+i,ASCX+j,".");
}
}
Disp2:
refresh();
}


dump()
{
int i,j;

length = rdsec();
disp(length);
return(length);
}

rdsec()
{
mvprintw(2,55,"Rel. Position : %08lX",filpos);
lseek(path,filpos,0);
length = read(path,secbuf,256);
return(length);
}

wrsec()
{
lseek(path,filpos,0);
write(path,secbuf,length);
}

help()
{
WINDOW *win;

win = newwin(0,0,0,0);
wclear(win);
mvwprintw(win,3,10,"Valid Commands are :");
mvwprintw(win,5,15,"D - Dump one page from current file position");
mvwprintw(win,6,15,"S - Set current file pointer");
mvwprintw(win,7,15,
"F - Find string in file (beginning from curr. position)");
mvwprintw(win,8,15,
"L - locate byte in file (beginning from curr. position)");
mvwprintw(win,9,15,"/ - Idem");
mvwprintw(win,10,15,"+ - Scroll forward 2 lines");
mvwprintw(win,11,15,"N - Display next sector");
mvwprintw(win,12,15,"- - Scroll back 2 lines");
mvwprintw(win,13,15,"P - Display previous sector");
mvwprintw(win,14,15,"e - Edit ASCII portion of file");
mvwprintw(win,15,15,"E - Edit binary portion of file");
mvwprintw(win,16,15,"W - Write modified sector back to disk");
mvwprintw(win,18,15,"Q - Quit Program");
mvwprintw(win,20,20,"Continue with any char.");
wrefresh(win);
getch();
delwin(win);
touchwin(stdscr);
refresh();
}

werr(errstr)
char *errstr;

{
beep();
move(LINES-1,0);
printw("%s",errstr);
refresh();
sleep(2);
move(LINES-1,0);
clrtoeol();
refresh();
}



header(left,mid,right)
char *left;
char *mid;
char *right;

{
mvprintw(0,0,"%s",left);
mvprintw(0,79-strlen(right),"%s",right);
mvprintw(0,40-strlen(mid)/2,"%s",mid);
}

donix(sig)
int sig;

{
signal(sig,donix);
}

bpe.1.1c 600 145 1 26217 4404625472 11260 0ustar davidsenother/***************************************************************************

Version History:

Ver.No Comment By
===========================================================================
1.0 first version (seems to do things right) andy@mssx
1.1 some bugs fixed (tks to Maarten) [email protected]
[email protected]
1.2 works with NOKEYPAD in all cases [email protected]
make + and - move in 2 line increments
add 'L' look for hex byte
end edit with ^E, ^C gives signal in BSD
/ remembers the last search string, can repeat

BUG REPORTS:
============
- The offset count in the first column is wrong,
except for the first line; it's 0x10 too high.
(fixed)
- The test in disp() if a char is printable, fails
for chars >= 0177.
(fixed)

- Help message for 'H' incorrect (fixed)


I declare this program as freeware, i.e. you may duplicate it, give it
to your friends, and transfer it to any machine you like, as long as
you do not change or delete the build in copyright message.

Andreas Pleschutznig
Teichhofweg 2
8044 Graz
Austria

Comments and bug reports to:
andy@mssx (mcvax!tuvie!mssx!andy)


*****************************************************************************/

#include
#include
#include
#include
#include

#define CTRL(c) ((c) & 037)
#define DEL '\177'

#ifdef NOKEYPAD
#define KEY_LEFT CTRL('H')
#define KEY_DOWN CTRL('J')
#define KEY_UP CTRL('K')
#define KEY_RIGHT CTRL('L')
#ifndef O_RDWR
#define O_RDWR 2
#endif
#define cbreak() crmode()
#define beep() putchar(7)
#endif

#define BELL 0x07
#define ASCX 63
#define ASCY 6
#define HEXY 6
#define HEXX 12

int path; /* path to file to patch */
long filpos; /* position in file */
unsigned char secbuf[256]; /* sector read buffer */

int donix(); /* default signal handling routine */
char filename[60];
int length; /* length of read sector */

main(argc,argv)
int argc;
char **argv;
{
if (argc != 2) {
fprintf(stderr,"Usage: %s filename\n",argv[0]);
exit(1);
}
if (( path = open(argv[1],O_RDWR)) == -1) {
fprintf(stderr,"%s: Can't open '%s'\n",argv[0],argv[1]);
exit(1);
}
sprintf(filename,"%s",argv[1]);
initscr();
refresh();
signal(SIGINT,donix);
#ifdef SIGQUIT
signal(SIGQUIT,donix);
#endif /* no QUIT in MS-DOS */
cbreak(); /* set single char input */
noecho();
#ifndef NOKEYPAD
keypad(stdscr,TRUE);
#endif
filpos = 0; /* set global position to 0 */
length = 0;
command();
clear();
refresh();
endwin();
close(path);
}

command()
{
int inval;

header("BPE Version 1.2",filename,"(C) 1988 MSS Graz");
inval = 0;
while ((inval != 'q') && (inval != 'Q')) {
move(2,0);
mvprintw(2,0,"COMMAND : ");
refresh();
inval = getch();
switch (inval) {
case 'q':
case 'Q':
break;
case 'h':
case 'H':
case '?':
help();
break;
case 'f':
case 'F':
case '/':
find_string();
dump();
break;
case 'L': /* repeat byte search */
++filpos;
rdsec();
case 'l': /* search for byte */
find_byte();
dump();
break;
case '+':
filpos += 32;
dump();
break;
case 'n':
case 'N':
filpos += 256;
dump();
break;
case '-':
filpos -= 32;
if (filpos < 0)
filpos = 0;
dump();
break;
case 'p':
case 'P':
filpos -= 256;
if (filpos < 0)
filpos = 0;
dump();
break;
case 'D':
case 'd':
dump();
break;
case 's':
case 'S':
set();
dump();
break;
case 'e':
edit_ascii();
break;
case 'E':
edit_hex();
break;
case 'w':
case 'W':
wrsec();
break;
default:
werr("Invalid Command !");
}
}
}

edit_ascii()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^E");
#else
printw("End editing with ^E");
#endif
curx = cury = 0;
while (inval != CTRL('E')) {
move(ASCY+cury,ASCX+curx);
refresh();
inval = getch();
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
default:
if ((inval >= 0x20) && (inval <= 0x7e)) {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
break;
}
}
move(2,0);
clrtoeol();
}

gethex(cury,curx)
int cury,curx;
{
int val;
int inlen;
int value;
char *hexvals = "0123456789ABCDEF";
char *strchr(), *wkptr;

inlen = 0;
while (inlen < 2) {
val = getch();
if (val > 0xff) return(val);
if (islower(val)) val = toupper(val);
wkptr = strchr(hexvals, val);
if (wkptr == NULL) return(val|0x2000);
else val = wkptr - hexvals;

switch (inlen) {
case 0:
value = val << 4;
secbuf[cury*16+curx] = value;
disp(length);
move(HEXY+cury,HEXX+curx*3+1);
refresh();
break;
case 1:
value += val ;
break;
}
inlen++;
}
return(value);
}

edit_hex()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^E");
#else
printw("End editing with ^E");
#endif
curx = cury = 0;
while (inval != -1) {
move(HEXY+cury,HEXX+curx*3);
refresh();
inval = gethex(cury,curx);
if (inval > 0xff) {
/* this is control information */
if (inval > 0x1fff)
inval &= 0xff;
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
case CTRL('E'):
inval = -1;
break;
}
}
else {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
}
move(2,0);
clrtoeol();
}

find_string()
{
int stlen;
char string[60];
static char laststring[60];
static int re_search = 0, old_filpos;
int found;
int searchpos;

move(2,0);
clrtoeol();
printw("String to search : ");
refresh();
echo();
getstr(string);
if (strlen(string) == 0) {
if (strlen(laststring) > 0)
strcpy(string, laststring);
else {
beep();
return;
}
}
else {
strcpy(laststring, string);
}
noecho();
move(2,0);
clrtoeol();
printw("Searching for '%s'",string);
found = 0;
searchpos = (filpos == old_filpos ? re_search : 0);
stlen = strlen(string);
while (found == 0) {
while ((256 - searchpos) >= stlen) {
if (testchar(secbuf+searchpos,string,stlen))
searchpos++;
else {
filpos += searchpos;
old_filpos = filpos;
#ifdef CLINES
if (filpos >= 16*CLINES) {
filpos -= 16*CLINES;
}
else {
filpos = 0;
}
#endif /* context lines */
#ifdef ALLIGN
filpos &= ~0xf;
#endif /* allign */
re_search = old_filpos - filpos + 1;
old_filpos = filpos;
found = 1;
break;
}
}
if (found == 0) {
filpos += searchpos;
searchpos = 0;
}
if (rdsec() == 0) {
found = 1;
}
refresh();
}
move(2, 0);
clrtoeol();
}

find_byte()
{
char string[80];
int srchbyte;
static int old_srchbyte = 0;
int found;
int searchpos;

move(2,0);
clrtoeol();
printw("Enter byte to find (hex) : ");
refresh();
echo();
getstr(string);
noecho();
move(2,0);
clrtoeol();
printw("Searching for : %s",string);
if (strlen(string) == 0)
{ /* re use the previous value */
srchbyte = old_srchbyte;
sprintf(string, "%02x", old_srchbyte);
}
else
{ /* get a new value */
sscanf(string, "%2x", &srchbyte);
old_srchbyte = srchbyte;
}
found = 0;
while (found == 0) {
for (searchpos = 0; searchpos < 256; ++searchpos) {
if (srchbyte == secbuf[searchpos]) {
found = 1;
break;
}
}
filpos += searchpos;
#ifdef CLINES
filpos -= 16*CLINES;
#endif /* contest */
#ifdef ALLIGN
filpos &= ~0xf;
#endif /* allign */
if (rdsec() == 0) break;
}
move(2, 0);
clrtoeol();
refresh();
}

testchar(buffer,string,length)
char *buffer;
char *string;
int length;
{
register int i;

i = 0;
while ( i < length) {
if (buffer[i] != string[i])
break;
i++;
}
if ( i == length)
return(0);
return(1);
}

set()
{
echo();
move(2,0);
clrtoeol();
printw("New File Position : ");
refresh();
scanw("%lx",&filpos);
move(2,0);
clrtoeol();
noecho();
}

disp(length)
int length;
{
int i, j, c;

/* output headings adjusted for the starting position */
mvprintw(4,0, " ADDRESS ");
for (i = 0, j = filpos & 0x0f; i < 16; ++i) {
printw(" 0%c", "0123456789ABCDEF"[j]);
j = (j + 1) % 16;
}
printw(" ASCII");

mvprintw(5,0, "%s%s",
"=======================================",
"========================================");

for ( i = 0; i < 16; i++) {
mvprintw(ASCY+i,0,"%08lX",filpos+i*16);
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtoeol();
goto Disp1;
}
mvprintw(ASCY+i,HEXX+j*3,"%02X",secbuf[i*16+j] & 0xFF);
}
Disp1:
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtobot();
goto Disp2;
}
if (' ' <= (c = secbuf[i * 16 + j]) && c < DEL)
mvprintw(ASCY+i,ASCX+j,"%c", c);
else
mvprintw(ASCY+i,ASCX+j,".");
}
}
Disp2:
refresh();
}


dump()
{
int i,j;

length = rdsec();
disp(length);
return(length);
}

rdsec()
{
mvprintw(2,55,"Rel. Position : %08lX",filpos);
refresh();
lseek(path,filpos,0);
length = read(path,secbuf,256);
return(length);
}

wrsec()
{
lseek(path,filpos,0);
write(path,secbuf,length);
}

help()
{
WINDOW *win;

win = newwin(0,0,0,0);
wclear(win);
mvwprintw(win,3,10,"Valid Commands are :");
mvwprintw(win,5,15,"D - Dump one page from current file position");
mvwprintw(win,6,15,"S - Set current file pointer");
mvwprintw(win,7,15,
"F - Find string in file (beginning from curr. position)");
mvwprintw(win,8,15,"/ - Idem");
mvwprintw(win,9,15,
"l - locate byte in file (beginning from curr. position)");
mvwprintw(win,9,15,
"L - locate byte in file (beginning from next byte)");
mvwprintw(win,10,15,"+ - Scroll forward 2 lines");
mvwprintw(win,11,15,"N - Display next sector");
mvwprintw(win,12,15,"- - Scroll back 2 lines");
mvwprintw(win,13,15,"P - Display previous sector");
mvwprintw(win,14,15,"e - Edit ASCII portion of file");
mvwprintw(win,15,15,"E - Edit binary portion of file");
mvwprintw(win,16,15,"W - Write modified sector back to disk");
mvwprintw(win,18,15,"Q - Quit Program");
mvwprintw(win,21,20,"Continue with any char.");
wrefresh(win);
getch();
delwin(win);
touchwin(stdscr);
refresh();
}

werr(errstr)
char *errstr;

{
beep();
move(LINES-1,0);
printw("%s",errstr);
refresh();
sleep(2);
move(LINES-1,0);
clrtoeol();
refresh();
}



header(left,mid,right)
char *left;
char *mid;
char *right;

{
mvprintw(0,0,"%s",left);
mvprintw(0,79-strlen(right),"%s",right);
mvprintw(0,40-strlen(mid)/2,"%s",mid);
}

donix(sig)
int sig;

{
signal(sig,donix);
}

mkbsd 700 145 1 163 4404343472 11077 0ustar davidsenotherecho "Making bpe for BSD"
make NKEYPAD="" LIBES="-lcurses -ltermcap" \
LOCAL="-O -Dstrchr=index -Dstrrchr=rindex"

mkdos386 700 145 1 252 4403415042 11344 0ustar davidsenotherecho "Making bpe for MS-DOS from Xenix 386"
make NKEYPAD="" \
LIBES="../doslib/Spccur.a ../doslib/Slibx.a" \
LOCAL="-dos -i -M0 -O -I../include/dos" &&
mv bpe bpe.exe

mksysv2 700 145 1 126 4403352542 11411 0ustar davidsenotherecho "Making bpe for system V.2 or later"
make NKEYPAD="" LIBES="-lcurses" LOCAL="-O"
mkvat 700 145 1 114 4403415042 11105 0ustar davidsenotherecho "Making bpe for V/AT"
make NKEYPAD="" LIBES="-lcurses" LOCAL="-Ml -O"

hexsrch.c 600 145 1 5143 4404640616 11706 0ustar davidsenother
/* Added by Jon LaBadie [email protected]
to implement the H (hex search) option */

#include
#include
#include
#define beep() putchar(7)

/*
** hex_2_byte returns the integer value of a byte
** represented by the two characters passed to it.
** For example, passed an '8' and an 'A', it will
** return 170 (8 * 16 + 10). Returns -1 on any error.
*/

int
hex_2_byte(a, b)
char a, b;
{
int v = 0;

if (!isxdigit(a) || !isxdigit(b))
return -1;

a = toupper(a);
b = toupper(b);

if (isdigit(a))
v = (a - '0') * 16;
else
v = (a - 'A' + 10) * 16;

if (isdigit(b))
v += (b - '0');
else
v += (b - 'A' + 10);

return v;
}


/* Take two strings as arguments.
** First is a sequence of hex digit pairs.
** Each pair is to be converted into the
** equivalent unsigned 1 byte value and
** stored in the second array.
*/

int
cvt_str(s, h)
char *s;
unsigned char *h;
{
int c;
int len = 0;

while(*s != '\0')
{
if (*(s+1) == '\0')
return -1;
c = hex_2_byte(*s, *(s+1));
if (c >= 0)
*h++ = c;
else
return -1;
len++;
s += 2;
}
*h = '\0';
return len;
}

find_hex()
{
int stlen;
char string[60];
char *strstart;
static char laststring[60];
static int re_search = 0, old_filpos;
unsigned char hexstr[30];
unsigned char *up;
int found;
int searchpos;
extern char secbuf[];
extern long filpos;

move(2,0);
clrtoeol();
printw("HEX string to search for: ");
refresh();
echo();
string[0] = '0';
getstr(&string[1]);
if (strlen(string) == 1) {
if (strlen(laststring) > 0)
strcpy(string, laststring);
else {
beep();
return;
}
}
else {
strcpy(laststring, string);
}
noecho();
move(2,0);
clrtoeol();
if (strlen(string) % 2)
strstart = &string[1];
else
strstart = &string[0];
stlen = cvt_str(strstart, hexstr);
if (stlen < 0)
{
printw("Invalid Hex string: %s", strstart);
refresh();
sleep(1);
return;
}
printw("Searching for '%s'", strstart);
refresh();
found = 0;
searchpos = 1;
while (found == 0) {
while ((256 - searchpos) >= stlen) {
if (secbuf[searchpos] != hexstr[0] || memcmp(secbuf + searchpos + 1, hexstr + 1, stlen - 1))
searchpos++;
else {
filpos += searchpos;
#ifdef CLINES
if (filpos >= 16*CLINES) {
filpos -= 16*CLINES;
}
else {
filpos = 0;
}
#endif /* context lines */
#ifdef ALLIGN
filpos &= ~0xf;
#endif /* allign */
re_search = old_filpos - filpos + 1;
old_filpos = filpos;
found = 1;
break;
}
}
if (found == 0) {
filpos += searchpos;
searchpos = 0;
}
if (rdsec() == 0) {
found = 1;
}
refresh();
}
move (2,0);
clrtoeol();
}
readme 600 145 1 3643 4404627734 11267 0ustar davidsenotherThis is Version 1.1 for the BPE Program I wrote some time ago,
there has been some bug fixes(tks to [email protected]).

To generate the new Version of the BPE program type

ed
then look at the new makefile, and correct the NKEYPAD value to
suit for your System.



Any further comments and bug reports are welcomed.




Andreas Pleschutznig
Micro Systems Software
Graz, Austria
andy@mssx
________________________________________________________________

Comments on v1.2:

The changes to work without KEYPAD defined failed on my system. After
making changes to get them functional, I rewrote part of the makefile. I
wanted to have found strings in context, so I added an option to leave
some data before the found string. I also added an option to start the
display after find on a 16 byte boundary to allow matching with other
dumps.

Then I added search for a byte, since I wanted that several times
while debugging, and finally after trying to move it to a BSD system I
changed the "end edit" key to ^E instead of ^C, since ^C is normally the
interrupt character on most of the systems I use, and signals are
ignored. The CTRL macro wasn't quite correct, and I cleaned up the
gethex procedure, which didn't quite work on my systems.

Oh yes, I wrote a man page for it, too. I still have a wish list if
anyone feels ambitious.

bill davidsen, 3/1/89 ([email protected])
________________________________________________________________

I sent my changes back to the original author, and he sent me *his*
version 1.2 with other enhancements over 1.1. He asked me to merge them,
and after looking at his changes and mine I added the code to find a hex
string to my code. We had fixed many of the same things and my makefile
seemed a bit cleaner. I also added a number of shell scripts to perform
makes, including MS-DOS. The man page has been updated to reflect the
combined version.

bill davidsen ([email protected])

bpe.c 600 145 1 24474 5233113125 11027 0ustar davidsenother/***************************************************************************

Version History:

Ver.No Comment By
===========================================================================
1.0 first version (seems to do things right) andy@mssx
1.1 some bugs fixed (tks to Maarten) [email protected]
[email protected]
1.2 works with NOKEYPAD in all cases [email protected]
make + and - move in 2 line increments
add 'L' look for hex byte
end edit with ^E, ^C gives signal in BSD
/ remembers the last search string, can repeat
1.3 integrate 1.2 (davidsen) and 1.2 (andy/jon) [email protected]
find hex string code added, author jon@joblab

BUG REPORTS:
============
- The offset count in the first column is wrong,
except for the first line; it's 0x10 too high.
(fixed)
- The test in disp() if a char is printable, fails
for chars >= 0177.
(fixed)

- Help message for 'H' incorrect (fixed)


I declare this program as freeware, i.e. you may duplicate it, give it
to your friends, and transfer it to any machine you like, as long as
you do not change or delete the build in copyright message.

Andreas Pleschutznig
Teichhofweg 2
8044 Graz
Austria

Comments and bug reports to:
andy@mssx (mcvax!tuvie!mssx!andy)


*****************************************************************************/

#include
#include
#include
#include
#include

/* this is needed for MS-DOS compilation */
#ifndef O_BINARY
#define O_BINARY 0
#endif

#define CTRL(c) ((c) & 037)
#define DEL '\177'

#ifdef NOKEYPAD
#define KEY_LEFT CTRL('H')
#define KEY_DOWN CTRL('J')
#define KEY_UP CTRL('K')
#define KEY_RIGHT CTRL('L')
#ifndef O_RDWR
#define O_RDWR 2
#endif
#ifndef cbreak
#define cbreak() crmode()
#endif
#define beep() putchar(7)
#endif

#define BELL 0x07
#define ASCX 63
#define ASCY 6
#define HEXY 6
#define HEXX 12

int path; /* path to file to patch */
long filpos; /* position in file */
unsigned char secbuf[256]; /* sector read buffer */

int donix(); /* default signal handling routine */
char filename[60];
int length; /* length of read sector */

main(argc,argv)
int argc;
char **argv;
{
if (argc != 2) {
fprintf(stderr,"Usage: %s filename\n",argv[0]);
exit(1);
}
if (( path = open(argv[1],O_RDWR|O_BINARY)) == -1) {
fprintf(stderr,"%s: Can't open '%s'\n",argv[0],argv[1]);
exit(1);
}
sprintf(filename,"%s",argv[1]);
initscr();
refresh();
signal(SIGINT,donix);
#ifdef SIGQUIT
signal(SIGQUIT,donix);
#endif /* no QUIT in MS-DOS */
cbreak(); /* set single char input */
noecho();
#ifndef NOKEYPAD
keypad(stdscr,TRUE);
#endif
filpos = 0; /* set global position to 0 */
length = 0;
command();
clear();
refresh();
endwin();
close(path);
}

command()
{
int inval;

header("BPE Version 1.3",filename,"(C) 1988 MSS Graz");
inval = 0;
while ((inval != 'q') && (inval != 'Q')) {
move(2,0);
mvprintw(2,0,"COMMAND : ");
refresh();
inval = getch();
switch (inval) {
case 'q':
case 'Q':
break;
case 'h':
case 'H':
find_hex();
dump();
break;
case '?':
help();
break;
case 'f':
case 'F':
case '/':
find_string();
dump();
break;
case '+':
filpos += 32;
dump();
break;
case 'n':
case 'N':
filpos += 256;
dump();
break;
case '-':
filpos -= 32;
if (filpos < 0)
filpos = 0;
dump();
break;
case 'p':
case 'P':
filpos -= 256;
if (filpos < 0)
filpos = 0;
dump();
break;
case 'D':
case 'd':
dump();
break;
case 's':
case 'S':
set();
dump();
break;
case 'e':
edit_ascii();
break;
case 'E':
edit_hex();
break;
case 'w':
case 'W':
wrsec();
break;
default:
werr("Invalid Command !");
}
}
}

edit_ascii()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^E");
#else
printw("End editing with ^E");
#endif
curx = cury = 0;
while (inval != CTRL('E')) {
move(ASCY+cury,ASCX+curx);
refresh();
inval = getch();
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
default:
if ((inval >= 0x20) && (inval <= 0x7e)) {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
break;
}
}
move(2,0);
clrtoeol();
}

gethex(cury,curx)
int cury,curx;
{
int val;
int inlen;
int value;
char *hexvals = "0123456789ABCDEF";
char *strchr(), *wkptr;

inlen = 0;
while (inlen < 2) {
val = getch();
if (val > 0xff) return(val);
if (islower(val)) val = toupper(val);
wkptr = strchr(hexvals, val);
if (wkptr == NULL) return(val|0x2000);
else val = wkptr - hexvals;

switch (inlen) {
case 0:
value = val << 4;
secbuf[cury*16+curx] = value;
disp(length);
move(HEXY+cury,HEXX+curx*3+1);
refresh();
break;
case 1:
value += val ;
break;
}
inlen++;
}
return(value);
}

edit_hex()
{
int inval = 0;
int cury,curx;

if (length == 0)
length = dump();
move(2,0);
clrtoeol();
#ifdef NOKEYPAD
printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^E");
#else
printw("End editing with ^E");
#endif
curx = cury = 0;
while (inval != -1) {
move(HEXY+cury,HEXX+curx*3);
refresh();
inval = gethex(cury,curx);
if (inval > 0xff) {
/* this is control information */
if (inval > 0x1fff)
inval &= 0xff;
switch (inval) {
case KEY_UP:
if (cury)
cury--;
else
beep();
break;
case KEY_DOWN:
if (cury < 15)
cury++;
else
beep();
break;
case KEY_RIGHT:
if (curx < 15)
curx++;
else
beep();
break;
case KEY_LEFT:
if (curx)
curx--;
else
beep();
break;
case CTRL('E'):
inval = -1;
break;
}
}
else {
secbuf[cury*16+curx] =inval;
curx++;
if (curx > 15) {
curx=0;
cury++;
}
if (cury > 15)
cury = 0;
disp(length);
}
}
move(2,0);
clrtoeol();
}

find_string()
{
int stlen;
char string[60];
static char laststring[60];
static int re_search = 0, old_filpos;
int found;
int searchpos;

move(2,0);
clrtoeol();
printw("String to search : ");
refresh();
echo();
getstr(string);
if (strlen(string) == 0) {
if (strlen(laststring) > 0)
strcpy(string, laststring);
else {
beep();
return;
}
}
else {
strcpy(laststring, string);
}
noecho();
move(2,0);
clrtoeol();
printw("Searching for '%s'",string);
found = 0;
searchpos = (filpos == old_filpos ? re_search : 0);
stlen = strlen(string);
while (found == 0) {
while ((256 - searchpos) >= stlen) {
if (testchar(secbuf+searchpos,string,stlen))
searchpos++;
else {
filpos += searchpos;
old_filpos = filpos;
#ifdef CLINES
if (filpos >= 16*CLINES) {
filpos -= 16*CLINES;
}
else {
filpos = 0;
}
#endif /* context lines */
#ifdef ALLIGN
filpos &= ~0xf;
#endif /* allign */
re_search = old_filpos - filpos + 1;
old_filpos = filpos;
found = 1;
break;
}
}
if (found == 0) {
filpos += searchpos;
searchpos = 0;
}
if (rdsec() == 0) {
found = 1;
}
refresh();
}
move(2, 0);
clrtoeol();
}

testchar(buffer,string,length)
char *buffer;
char *string;
int length;
{
register int i;

i = 0;
while ( i < length) {
if (buffer[i] != string[i])
break;
i++;
}
if ( i == length)
return(0);
return(1);
}

set()
{
echo();
move(2,0);
clrtoeol();
printw("New File Position : ");
refresh();
scanw("%lx",&filpos);
move(2,0);
clrtoeol();
noecho();
}

disp(length)
int length;
{
int i, j, c;

/* output headings adjusted for the starting position */
mvprintw(4,0, " ADDRESS ");
for (i = 0, j = filpos & 0x0f; i < 16; ++i) {
printw(" 0%c", "0123456789ABCDEF"[j]);
j = (j + 1) % 16;
}
printw(" ASCII");

mvprintw(5,0, "%s%s",
"=======================================",
"========================================");

for ( i = 0; i < 16; i++) {
mvprintw(ASCY+i,0,"%08lX",filpos+i*16);
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtoeol();
goto Disp1;
}
mvprintw(ASCY+i,HEXX+j*3,"%02X",secbuf[i*16+j] & 0xFF);
}
Disp1:
for (j = 0; j < 16; j++) {
if (( i*16 + j ) >= length) {
clrtobot();
goto Disp2;
}
if (' ' <= (c = secbuf[i * 16 + j]) && c < DEL)
mvprintw(ASCY+i,ASCX+j,"%c", c);
else
mvprintw(ASCY+i,ASCX+j,".");
}
}
Disp2:
refresh();
}


dump()
{
int i,j;

length = rdsec();
disp(length);
return(length);
}

rdsec()
{
mvprintw(2,55,"Rel. Position : %08lX",filpos);
refresh();
lseek(path,filpos,0);
length = read(path,secbuf,256);
return(length);
}

wrsec()
{
lseek(path,filpos,0);
write(path,secbuf,length);
}

help()
{
WINDOW *win;

win = newwin(0,0,0,0);
wclear(win);
mvwprintw(win,3,10,"Valid Commands are :");
mvwprintw(win,5,15,"D - Dump one page from current file position");
mvwprintw(win,6,15,"S - Set current file pointer");
mvwprintw(win,7,15,
"F - Find string in file (beginning from curr. position)");
mvwprintw(win,8,15,
"H - locate hex bytes in file (beginning from curr. position)");
mvwprintw(win,9,15,"N - Display next sector");
mvwprintw(win,10,15,"P - Display previous sector");
mvwprintw(win,11,15,"+ - Scroll forward 2 lines");
mvwprintw(win,12,15,"- - Scroll back 2 lines");
mvwprintw(win,13,15,"e - Edit ASCII portion of file");
mvwprintw(win,14,15,"E - Edit binary portion of file");
mvwprintw(win,15,15,"W - Write modified sector back to disk");
mvwprintw(win,16,15,"Q - Quit Program");
mvwprintw(win,18,20,"Continue with any char.");
wrefresh(win);
getch();
delwin(win);
touchwin(stdscr);
refresh();
}

werr(errstr)
char *errstr;

{
beep();
move(LINES-1,0);
printw("%s",errstr);
refresh();
sleep(2);
move(LINES-1,0);
clrtoeol();
refresh();
}



header(left,mid,right)
char *left;
char *mid;
char *right;

{
mvprintw(0,0,"%s",left);
mvprintw(0,79-strlen(right),"%s",right);
mvprintw(0,40-strlen(mid)/2,"%s",mid);
}

donix(sig)
int sig;

{
signal(sig,donix);
}

makefile 600 145 1 2726 4414052264 11577 0ustar davidsenother#________________ Start customizing here ________________
#
# If your Terminals and your curses lib supports keypad()
# comment out the next line. You probably need it for BSD.
NKEYPAD = -DNOKEYPAD

# if you want the search operations to show found patterns in context,
# set CLINES to the number of line of data to display before the pattern.
# else comment out the next line
# CLINES = -DCLINES=1

# if you want the search operations to start the display on a mod 16
# boundary, leave the next line, else comment out
#ALLIGN = -DALLIGN

# libraries to make curses work on your machine. Probably just curses
# for V.2 and later, as is for BSD. You could try termlib instead of
# termcap if the termcap library is not available.
LIBES = -lcurses -ltermcap

# local compilation and link options needed, such a 286 model selection, etc
LOCAL =
#
# ________________ Stop customizing here ________________


CFLAGS = -O $(NKEYPAD) $(CLINES) $(ALLIGN)
OBJS = bpe.o hexsrch.o
SRCS = bpe.c hexsrch.c
EXEC = bpe

# for making a shar file
SHARLIST = $(SRCS) makefile readme bpe.1
SHAR = shar

$(EXEC): $(OBJS)
$(CC) -o $(EXEC) $(LOCAL) $(OBJS) $(LIBES)

#$(OBJS): $(SRCS)
# $(CC) -c $(CFLAGS) $(LOCAL) $(SRCS)
# special makerules here, portable
.c.o:
$(CC) -c $(CFLAGS) $(LOCAL) $?

shar: bpe.shar
bpe.shar: $(SHARLIST)
$(SHAR) $(SHARLIST) > bpe.shar

arc: bpe.arc
bpe.arc: bpe.exe bpe.doc
arc a bpe $?
rm bpe.doc

bpe.doc: bpe.1
nroff -man -Tlp bpe.1 | col > bpe.doc
mklinux 700 145 1 103 5233113166 11454 0ustar davidsenotherecho "Making bpe for Linux 0.96c"
make LIBES="-lcurses" LOCAL="-O"
bpe.o 600 145 1 22526 5233113355 11044 0ustar davidsenotherÔ@$à Usage: %s filename
%s: Can't open '%s'
%sU‰åVS‹]‹u èÄÿÿÿƒûtÿ6hhè®ÿÿÿƒÄ jè¤ÿÿÿjÿvèšÿÿÿƒÄ£ƒøÿu!ÿvÿ6hhèyÿÿÿƒÄjèoÿÿÿÿvh)hèZÿÿÿƒÄ èRÿÿÿÿ5èGÿÿÿƒÄhÀjè8ÿÿÿƒÄhÀjè)ÿÿÿƒÄƒ% ýÆhjÿ5èÿÿÿƒÄ ƒ% ÷Æhjÿ5èãþÿÿƒÄ ÇÇèsÿ5è¼þÿÿƒÄÿ5è®þÿÿƒÄè¦þÿÿÿ5è›þÿÿeø[^ÉÃ(C) 1988 MSS GrazBPE Version 1.3COMMAND : Invalid Command !U‰åShlhh~è|ƒÄ jjÿ5è)þÿÿƒÄ hŽjjèþÿÿƒÄ ÿ5è
þÿÿƒÄÿ5èüýÿÿƒÄ‰ÃSÕ¸L9ЂÓÿ$• xììpìììììììììììììììdììììYÜpìTììììì„ì¬ùìÌìììäììììììììììììYÔpìTììììì„ì¬ùìÌìììäè§üÿÿèR
閐è× é‹èë␃ ëؐëÉ¡ƒÀà£yºÇ뮐¡ÿÿÿ£yœÇ됐è/놐èoëèÓëèW
ëh™è¦
ƒÄƒûqt ƒûQ…Áýÿÿ‹]üÉÃLeft ^H - down ^J - up ^K - right ^L - end editing with ^EU‰åWVS1ÿƒ=u
èR £jjÿ5èŽûÿÿƒÄ ÿ5è€ûÿÿƒÄh èsûÿÿƒÄ1ö1ۃÿ„ÿC?PFPÿ5èPûÿÿƒÄ ÿ5èBûÿÿƒÄÿ5è4ûÿÿƒÄ‰Çƒÿ
t.ƒÿt7ëyƒÿ tƒÿ t"ël…ötN롐‹9s,ë@ƒþëF눃ûãC뀅ÛtKévÿÿÿ‹9rjhèÆúÿÿƒÄéRÿÿÿ¡Æÿé=ÿÿÿƒÿŽ3ÿÿÿƒÿ~*ÿÿÿ‰ðÁà‰úˆ”Cƒû~1ÛFƒþ~1öÿ5詃Äéùþÿÿjjÿ5èUúÿÿƒÄ ÿ5èGúÿÿeô[^_ÉÃ0123456789ABCDEFU‰åƒìWVS1ö‹M I‰Uüÿ5è
úÿÿƒÄ‰Ãûÿ¦¡ŠX$t ¡¶ShÁèÜùÿÿƒÄ…Àu ‰Ø€Ì ëx‰ÃëÁ…ötƒþtWëW‰ßÁç‹EÁà‰ù‹U ˆŒÿ5è҃ċEüƒÀ
P‹EƒÀPÿ5èzùÿÿƒÄ ÿ5èlùÿÿƒÄ됐ßFƒþŽ@ÿÿÿ‰øeð[^_ÉÃU‰åWVS1ÿƒ=u
èæ£jjÿ5è"ùÿÿƒÄ ÿ5èùÿÿƒÄh èùÿÿƒÄ1ö1ۃÿÿ„7D[ PFPÿ5èãøÿÿƒÄ ÿ5èÕøÿÿƒÄSVèŸþÿÿƒÄ‰ÇÿÿŽÆÿÿ~çÿWû¸9Ðr ÿ$•h¼¤ˆ°…ötNénÿÿÿ‹
9
s4ëHƒþëFéQÿÿÿƒûßCéEÿÿÿ…ÛtKé:ÿÿÿ‹
9
rjhèøÿÿƒÄéÿÿÿ¡Æÿéÿÿÿ¿ÿÿÿÿéöþÿÿ‰ðÁà‰ùˆŒCƒû~1ÛFƒþ~1öÿ5èƒÄéÃþÿÿjjÿ5è±÷ÿÿƒÄ ÿ5è£÷ÿÿeô[^_ÉÃString to search : Searching for '%s'U‰åƒì@WVSjjÿ5è\÷ÿÿƒÄ ÿ5èN÷ÿÿƒÄheèA÷ÿÿƒÄÿ5è3÷ÿÿƒÄ€
Æhjÿ5è÷ÿÿƒÄ ]ÄSÿ5èþöÿÿƒÄ‰ß0À¹ÿÿÿÿò®÷щÈHuQ¿Ø0À¹ÿÿÿÿò®÷щÈHthØSë=¡9rjhè³öÿÿéS¡Æÿé>EÄPhØèŠöÿÿƒÄƒ% ÷Æhjÿ5ègöÿÿƒÄ jjÿ5èUöÿÿƒÄ ÿ5èGöÿÿƒÄEÄPhyè6öÿÿƒÄ1ö1Û¡9u‹Ô0À}Ĺÿÿÿÿò®‰È÷Ѝxÿ…ö…‰ëPWEÄPƒPè›ƒÄ …Àu4‰Ø££¡+@£Ô¡£¾ëC¸)Ø9ø}¨…öu1Ûèw…Àu¾ÿ5èõÿÿƒÄ…ötÉjjÿ5èiõÿÿƒÄ ÿ5è[õÿÿe´[^_ÉÃU‰åVS‹]‹u ‹U1À9Ð}
Š 8 0u@9Ð|ó9Ðt¸ë1Àeø[^ÉÃNew File Position : %lxU‰å€
Æhjÿ5èÝôÿÿƒÄ jjÿ5èËôÿÿƒÄ ÿ5è½ôÿÿƒÄhå
è°ôÿÿƒÄÿ5è¢ôÿÿƒÄhhú
èôÿÿƒÄjjÿ5è~ôÿÿƒÄ ÿ5èpôÿÿƒÄƒ% ÷Æhjÿ5èMôÿÿÉА ADDRESS 0%c ASCII===============================================================================%s%s%08lX%02X%c.U‰åƒìWVSh¸ jjè­óÿÿƒÄ 1ÿ‹ƒã¾ƒÁPhÄ èŠóÿÿƒÄC‰ÚyƒÃ‰Ø$ð‰Ó)ÃGƒÿ~ÕhÉ ègóÿÿƒÄhÕ hþ h& jjèLóÿÿƒÄ1ÿ‰øÁàPh+ jGPè(óÿÿƒÄ1ۉþÁ搐39Eÿ5è óÿÿƒÄë%¶„3Ph1 D[ PGPèèòÿÿƒÄCƒû~Ã1ۉùÁá‰Müw‹EüØ9Eÿ5è»òÿÿƒÄëP‹Mü¶„ ƒø~ƒø~Ph6 C?PVèòÿÿƒÄ됐h9 C?PVèyòÿÿƒÄ Cƒû~ GƒÿŽ"ÿÿÿÿ5è[òÿÿeð[^_ÉÃU‰åè,£Pèyþÿÿ¡ÉАRel. Position : %08lXU‰åÿ5hÌ
j7jèòÿÿƒÄÿ5è÷ñÿÿƒÄjÿ5ÿ5èáñÿÿƒÄ hhÿ5èÉñÿÿ£ÉАU‰åjÿ5ÿ5èªñÿÿƒÄ ÿ5hÿ5è‘ñÿÿÉАValid Commands are :D - Dump one page from current file positionS - Set current file pointerF - Find string in file (beginning from curr. position)H - locate hex bytes in file (beginning from curr. position)N - Display next sectorP - Display previous sector+ - Scroll forward 2 lines- - Scroll back 2 linese - Edit ASCII portion of fileE - Edit binary portion of fileW - Write modified sector back to diskQ - Quit ProgramContinue with any char.U‰åSjjjjè¯ïÿÿƒÄ‰ÃSè¤ïÿÿƒÄhtj
jSè’ïÿÿƒÄh‰jjSè€ïÿÿƒÄh¶jjSènïÿÿƒÄhÓjjSè\ïÿÿƒÄh jjSèJïÿÿƒÄhHjj Sè8ïÿÿƒÄh`jj
Sè&ïÿÿƒÄh|jj SèïÿÿƒÄh—jj SèïÿÿƒÄh¯jj
SèðîÿÿƒÄhÎjjSèÞîÿÿƒÄhîjjSèÌîÿÿƒÄhjjSèºîÿÿƒÄh&jjSè¨îÿÿƒÄSèŸîÿÿƒÄÿ5è‘îÿÿƒÄSèˆîÿÿƒÄÿ5èzîÿÿƒÄÿ5èlîÿÿ‹]üÉÃU‰å‹9rjhèGîÿÿƒÄ됐¡Æÿj¡HPÿ5èîÿÿƒÄ ÿuh)èîÿÿƒÄÿ5èîÿÿƒÄjèöíÿÿƒÄj¡HPÿ5èßíÿÿƒÄ ÿ5èÑíÿÿƒÄÿ5èÃíÿÿÉÐU‰åƒìWVS‹u ‹]ÿuh)jjè íÿÿƒÄSh)‰ß0À¹ÿÿÿÿò®÷щMü¸P)ÈPjèxíÿÿƒÄVh)‰÷0À¹ÿÿÿÿò®÷щÈHÑè‰Eü¸(+EüPjèJíÿÿeð[^_ÉÃU‰åhÀÿuè0íÿÿÉАÌ
IJ
„
e\
S9
4 +'
& 
 A B
ü
÷ î(
éÞ
Ù ÑA Ê) Á) µ*
°) §) ¡) 
‹ ‚@
} t?
k
f ]
T>
JB>
80>
&>
 >
ú>
ðè>
ÞÖ>
ÌÄ>
º²>
¨ >
–Ž>
„|>
rj>
`X
M=
k<
f `+ [ R:
M G 8 3;
. (+ :
  
 ÷

î
é
 Ä
 ¹
 ¡

œ
ƒ

y
m

c
S
+ A
9
<




+ ó '
î Ô 
É Ã  ° 
§ ¢  • (
 r (
m g Z  O 
F ¯ 
ª  ¢  œ  •  Œ '
‡ ~ 
y l 8
g b  Z
U L (
G ? '
: 1 
,  
       ¡
'
œ
“

Ž
}

x
b
 E
@
;
5
 /
*
 %


+ à Ø  Ò Æ (
Á µ '
° § 
¢ • 
  ˆ  ‚  {  r 5
m ^ ) U ) I *
D ) ; ) 5 ) -  þ4
ù ì
ç ß Ù Ò É
Ä »(
¶®'
©  
› Y'
T K
F , + ö) í) Þ*
Ù) Ð) Ê) œ) –) „€|xtplhc'
" 
 õ(
ðè'
ã Ú
Õ Ë ¾ 
‹ ‚
} a [+ 8 0
/ . ï
ê µ'
° §
¢ Š t+ N) E) 6*
1) () ") ü) ö) È
à º
µ ¬
§ ‰(
„|'
w n
i _ R í¿ · ­ ¡ ™ ‘ † z U
PLHD@<840,($  üøôðìèäàÜØÔÐÌÈÄÀ¼¸´°¬¨¤ œ˜”Œˆ„€|xtplhd`\XTPLHD@<840,($ 
û ò
í ä
ÛÓ
Î »¶ ±a
\ V
N
I @
; , " 
   ÿ ö
ñ é ã Ü Ó
ÌÄ
½µ
° ª

¢
 ˜
ƒ
~ yj b
X
N
I D8
,!-6<BH<R[dlvÀ}…‹•ž©²ºÂ¬ËÓÛâ@êñû
°
@Œ& +H7´A@HœNYamy< ‡Ôš«³ØÂÔÐßèð°
úä
 '/:BLSZgcc2_compiled._main___main__cerr_sbuf_fprintf_exit_open_path_filename_sprintf_initscr_stdscr_wrefresh_donix_signal__tty__rawmode__tty_ch_tcsetattr__echoit_filpos_length_command_wclear_endwin_close_header_wmove_mvprintw_wgetch_find_hex_dump_help_find_string_set_edit_ascii_edit_hex_wrsec_werr_wclrtoeol_printw__cout_sbuf___overflow_secbuf_disp_gethex___ctype_b___ctype_toupper_strchr_laststring.12_re_search.13_old_filpos.14_wgetstr_strcpy_testchar_rdsec_scanw_wclrtobot_lseek_read_write_newwin_mvwprintw_delwin_touchwin_LINES_sleephexsrch.o 600 145 1 4031 5233113001 11675 0ustar davidsenother¸@8øU‰åSŠMŠ] ¾Á‹öB(t ¾ÃöB(u
¸ÿÿÿÿëT¾Á‹Š ¾ÃŠ¾Ñ¡ŠP$tƒÂÐ됐¾ÑƒÂÉÁâ¾Ë¡ŠH$tTÐë ¾ÃTɉЋ]üÉÃU‰åWVS‹]‹u 1ÿ€;t1€{t¾CP¾PèTÿÿÿƒÄ…À} ¸ÿÿÿÿ됐ˆFGƒÃ€;uÐƉøeô[^_ÉÃHEX string to search for: Invalid Hex string: %sSearching for '%s'U‰åƒìpWVSjjÿ5èÌþÿÿƒÄ ÿ5è¾þÿÿƒÄhÕè±þÿÿƒÄÿ5è£þÿÿƒÄ€
Æhjÿ5è€þÿÿƒÄ ÆEÄ0EÅPÿ5èjþÿÿƒÄUĉ×0À¹ÿÿÿÿò®÷щÈHƒøuS¿¼0À¹ÿÿÿÿò®÷щÈHt
h¼Rë?¡9rjhèþÿÿéÁ¡Æÿ鬐EÄPh¼èîýÿÿƒÄƒ% ÷Æhjÿ5èËýÿÿƒÄ jjÿ5è¹ýÿÿƒÄ ÿ5è«ýÿÿƒÄ0À}Ĺÿÿÿÿò®‰È÷Шu]Å됐]čE¤PSèþÿÿƒÄ‰E ƒ} }+ShðèhýÿÿƒÄÿ5èZýÿÿƒÄjèPýÿÿéúShè=ýÿÿƒÄÿ5è/ýÿÿƒÄÇEœ»‹E H‰E˜E¥‰E”¸)Ø9E `¶U¤¾ƒ9Ðu³‹}”‹M˜¨ó¦tCë0‰Ú‰¡ø+@£¸‰øÇEœë¸)Ø9E ~¤ƒ}œu1Ûè‘üÿÿ…ÀuÇEœÿ5è{üÿÿƒÄƒ}œ„^ÿÿÿjjÿ5è_üÿÿƒÄ ÿ5èQüÿÿe„[^_Éë
¦ 

˜ 

| k
d A;5 /* $
  Í

È ¿
º¬
¢

 ”
Q
L C

> 1
, $   
ú ñ å
à × Ñ Ç²’
 |
w o i b Y

T K
F>
9 0

+ a B 1  *;„D¼R¸_ømw†‘™£©²»ÆÏÛçïöþ
gcc2_compiled._hex_2_byte___ctype_b___ctype_toupper_cvt_str_laststring.6_re_search.7_old_filpos.8_find_hex_stdscr_wmove_wclrtoeol_printw_wrefresh__tty__echoit__tty_ch_tcsetattr_wgetstr__cout_sbuf___overflow_strcpy_sleep_secbuf_filpos_rdsecbpe 711 145 1 61321 5233113362 10604 0ustar davidsenother d `èS¸-»Í€£ŒrÂÙ-:‹D$£Ô‚ÂèBPè4•À[¸̀ë÷bUsage: %s filename
%s: Can't open '%s'
%sU‰åVS‹]‹u èЃûtÿ6h@hôˆÂè^©ÀƒÄ jèȔÀjÿvèJÁƒÄ£ "ƒøÿu!ÿvÿ6hThôˆÂè)©ÀƒÄj蓔ÀÿvhihÌ èþ½ÁƒÄ èÊ)Âÿ5èÂè£5ƒÄhjè¼¹ÁƒÄhjè­¹ÁƒÄƒ%DbÅýÆ܏Âh8bÅjÿ5äÂè>øÁƒÄ ƒ%DbÅ÷ÆۏÂh8bÅjÿ5äÂèøÁƒÄ Ǹ Ç"èsÿ5èÂèàƒÄÿ5èÂè
5ƒÄè~%Âÿ5 "è¯+Àeø[^ÉÃ(C) 1988 MSS GrazBPE Version 1.3COMMAND : Invalid Command !U‰åSh¬hÌ h¾è|ƒÄ jjÿ5èÂèI+ÂƒÄ hÎjjèt+ÂƒÄ ÿ5èÂèf4ƒÄÿ5èÂèl&ƒĉÍSÕ¸L9ЂÓÿ$•`¸,Ð,°,,,,,,,,,,,,,,,¤,,,,™°,”,,,,,Ä,ì9, ,,,$,,,,,,,,,,,,™°,”,,,,,Ä,ì9, ,,,$è—èR
閐è× é‹èë␃¸ ëؐ¸ ëÉ¡¸ ƒÀࣸ yºÇ¸ 뮐¡¸ ÿÿÿ£¸ yœÇ¸ 됐è/놐èoëèÓëèW
ëhÙè¦
ƒÄƒûqt ƒûQ…Áýÿÿ‹]üÉÃLeft ^H - down ^J - up ^K - right ^L - end editing with ^EU‰åWVS1ÿƒ="u
èR £"jjÿ5èÂè®(ÂƒÄ ÿ5èÂèLƒÄhLèÃ0ƒÄ1ö1ۃÿ„ÿC?PFPÿ5èÂèp(ÂƒÄ ÿ5èÂèž1ƒÄÿ5èÂè¤#ƒĉǃÿ
t.ƒÿt7ëyƒÿ tƒÿ t"ël…ötN롐‹ÀˆÂ9¼ˆÂs,ë@ƒþëF눃ûãC뀅ÛtKévÿÿÿ‹ÀˆÂ9¼ˆÂrjh¨ˆÂèbÈÁƒÄéRÿÿÿ¡¼ˆÂÆÿ¼ˆÂé=ÿÿÿƒÿŽ3ÿÿÿƒÿ~*ÿÿÿ‰ðÁà‰úˆ”!Cƒû~1ÛFƒþ~1öÿ5"詃Äéùþÿÿjjÿ5èÂèu'ÂƒÄ ÿ5èÂèeô[^_ÉÃ0123456789ABCDEFU‰åƒìWVS1ö‹M I‰Uüÿ5èÂè}"ƒĉÁûÿ¦¡Ì€ÂŠX$t ¡Ô€Â¶ShèàÚÁƒÄ…Àu ‰Ø€Ì ëx‰Ãë…ötƒþtWëW‰ßÁç‹EÁà‰ù‹U ˆŒ!ÿ5"è҃ċEüƒÀ
P‹EƒÀPÿ5èÂèš&ÂƒÄ ÿ5èÂèÈ/ƒÄ됐ßFƒþŽ@ÿÿÿ‰øeð[^_ÉÃU‰åWVS1ÿƒ="u
èæ£"jjÿ5èÂèB&ÂƒÄ ÿ5èÂèàƒÄhLèW.ƒÄ1ö1ۃÿÿ„7D[ PFPÿ5èÂè&ÂƒÄ ÿ5èÂè1/ƒÄSVèŸþÿÿƒÄ‰ÇÿÿŽÆÿÿ~çÿWû¸9Ðr ÿ$•¨@@@ü@äÈð…ötNénÿÿÿ‹
ÀˆÂ9
¼ˆÂs4ëHƒþëFéQÿÿÿƒûßCéEÿÿÿ…ÛtKé:ÿÿÿ‹
ÀˆÂ9
¼ˆÂrjh¨ˆÂèºÅÁƒÄéÿÿÿ¡¼ˆÂÆÿ¼ˆÂéÿÿÿ¿ÿÿÿÿéöþÿÿ‰ðÁà‰ùˆŒ!Cƒû~1ÛFƒþ~1öÿ5"èƒÄéÃþÿÿjjÿ5èÂèÑ$ÂƒÄ ÿ5èÂèoeô[^_ÉÃString to search : Searching for '%s'U‰åƒì@WVSjjÿ5èÂè|$ÂƒÄ ÿ5èÂèƒÄh¥è‘,ƒÄÿ5èÂè-ƒĀ
DbÅÆۏÂh8bÅjÿ5äÂèHðÁƒÄ ]ÄSÿ5èÂèª ÂƒÄ‰ß0À¹ÿÿÿÿò®÷щÈHuQ¿8 0À¹ÿÿÿÿò®÷щÈHth8 Së=¡ÀˆÂ9¼ˆÂrjh¨ˆÂèOÄÁéS¡¼ˆÂÆÿ¼ˆÂé>EÄPh8 è×ÁƒÄƒ%DbÅ÷ÆۏÂh8bÅjÿ5äÂèŸïÁƒÄ jjÿ5èÂèu#ÂƒÄ ÿ5èÂè
ƒčEÄPh¹è†+ƒÄ1ö1Û¡t 9¸ u‹ 0À}Ĺÿÿÿÿò®‰È÷Ѝxÿ…ö…‰ëPWEÄPƒ!Pè›ƒÄ …Àu4‰Ø¸ £t £¸ ¡t +¸ @£ ¡t £t ¾ëC¸)Ø9ø}¨…öu¸ 1Ûèw…Àu¾ÿ5èÂèÛ+ƒąötÉjjÿ5èÂè‰"ÂƒÄ ÿ5èÂè' e´[^_ÉÃU‰åVS‹]‹u ‹U1À9Ð}
Š 8 0u@9Ð|ó9Ðt¸ë1Àeø[^ÉÃNew File Position : %lxU‰å€
DbÅÆۏÂh8bÅjÿ5äÂèîÁƒÄ jjÿ5èÂèë!ÂƒÄ ÿ5èÂè‰ ÂƒÄh% è*ƒÄÿ5èÂèþ*ƒÄh¸ h: è@3ƒÄjjÿ5èÂèž!ÂƒÄ ÿ5èÂè< ƒă%DbÅ÷ÆۏÂh8bÅjÿ5äÂè…íÁÉА ADDRESS 0%c ASCII===============================================================================%s%s%08lX%02X%c.U‰åƒìWVShø jjè !ÂƒÄ 1ÿ‹¸ ƒã¾ƒPh èÚ(ƒÄC‰ÚyƒÃ‰Ø$ð‰Ó)ÃGƒÿ~Õh è·(ƒÄh h> hf jjè¨ ÂƒÄ1ÿ‰øÁภPhk jGPè„ ÂƒÄ1ۉþÁ搐39Eÿ5èÂèÕ ÂƒÄë%¶„3!Phq D[ PGPèD ƒÄCƒû~Ã1ۉùÁá‰Müw‹EüØ9Eÿ5èÂèûƒÄëP‹Mü¶„ !ƒø~ƒø~Phv C?PVèëƒÄ됐hy C?PVèÕÂƒÄ Cƒû~ GƒÿŽ"ÿÿÿÿ5èÂè·(eð[^_ÉÃU‰åè,£"Pèyþÿÿ¡"ÉАRel. Position : %08lXU‰åÿ5¸ h j7jèaƒÄÿ5èÂèS(ƒÄjÿ5¸ ÿ5 "è™õÀƒÄ hh!ÿ5 "è#Á£"ÉАU‰åjÿ5¸ ÿ5 "èbõÀƒÄ ÿ5"h!ÿ5 "èÙ÷ÁÉАValid Commands are :D - Dump one page from current file positionS - Set current file pointerF - Find string in file (beginning from curr. position)H - locate hex bytes in file (beginning from curr. position)N - Display next sectorP - Display previous sector+ - Scroll forward 2 lines- - Scroll back 2 linese - Edit ASCII portion of fileE - Edit binary portion of fileW - Write modified sector back to diskQ - Quit ProgramContinue with any char.U‰åSjjjjè˃ĉÃSèȃÄh´j
jSè&ƒÄhÉjjSèƒÄhöjjSèƒÄhjjSèðƒÄhKjjSèÞƒÄhˆjj Sè̃Äh jj
SèºÂƒÄh¼jj Sè¨ÂƒÄh×jj Sè–ƒÄhïjj
S脃ÄhjjSèrƒÄh.jjSè`ƒÄhUjjSèNƒÄhfjjSè<ƒÄSèû$ƒÄÿ5èÂèƒÄSèÀƒÄÿ5èÂèæ.ƒÄÿ5èÂèÈ$‹]üÉÃU‰å‹ÀˆÂ9¼ˆÂrjh¨ˆÂèã»ÁƒÄ됐¡¼ˆÂÆÿ¼ˆÂj¡„`ÃHPÿ5èÂè>ÂƒÄ ÿuhiè^#ƒÄÿ5èÂè\$ƒÄj覩ÁƒÄj¡„`ÃHPÿ5èÂèÿÂƒÄ ÿ5èÂèÂƒÄÿ5èÂè$ÂÉÐU‰åƒìWVS‹u ‹]ÿuhijjèüƒÄShi‰ß0À¹ÿÿÿÿò®÷щMü¸P)ÈPjèÔƒÄVhi‰÷0À¹ÿÿÿÿò®÷щÈHÑè‰Eü¸(+EüPjè¦Âeð[^_ÉÃU‰åhÿuè´§ÁÉАU‰åSŠMŠ] ¾Á‹̀ÂöB(t ¾ÃöB(u
¸ÿÿÿÿëT¾Á‹ԀŠ ¾ÃŠ¾Ñ¡Ì€ÂŠP$tƒÂÐ됐¾ÑƒÂÉÁâ¾Ë¡Ì€ÂŠH$tTÐë ¾ÃTɉЋ]üÉÃU‰åWVS‹]‹u 1ÿ€;t1€{t¾CP¾PèTÿÿÿƒÄ…À} ¸ÿÿÿÿ됐ˆFGƒÃ€;uÐƉøeô[^_ÉÃHEX string to search for: Invalid Hex string: %sSearching for '%s'U‰åƒìpWVSjjÿ5èÂèÂƒÄ ÿ5èÂè¶ÂƒÄhéè-!ƒÄÿ5èÂè+"ƒĀ
DbÅÆۏÂh8bÅjÿ5äÂèääÁƒÄ ÆEÄ0EÅPÿ5èÂèBƒčUĉ×0À¹ÿÿÿÿò®÷щÈHƒøuS¿x 0À¹ÿÿÿÿò®÷щÈHt
hx Rë?¡ÀˆÂ9¼ˆÂrjh¨ˆÂè߸ÁéÁ¡¼ˆÂÆÿ¼ˆÂ鬐EÄPhx è’ËÁƒÄƒ%DbÅ÷ÆۏÂh8bÅjÿ5äÂè/äÁƒÄ jjÿ5èÂèÂƒÄ ÿ5èÂè£ÂƒÄ0À}Ĺÿÿÿÿò®‰È÷Шu]Å됐]čE¤PSèþÿÿƒÄ‰E ƒ} }+ShèäƒÄÿ5èÂèâ ƒÄjè,¦ÁéúShè¹ÂƒÄÿ5èÂè· ÂƒÄÇEœ»‹E H‰E˜E¥‰E”¸)Ø9E `¶U¤¾ƒ!9Ðu³ !‹}”‹M˜¨ó¦tCë0‰Ú¸ ‰¸ ¡´ +¸ @£ ‰´ ÇEœë¸)Ø9E ~¤ƒ}œu¸ 1Ûè¡÷ÿÿ…ÀuÇEœÿ5èÂè ƒă}œ„^ÿÿÿjjÿ5èÂè«ÂƒÄ ÿ5èÂèIe„[^_ÉÃU‰åVS‹¼ ƒúÿu1҃<•À t¸À ƒÀBƒ8u÷‰Ó…Ût4¼ ‹ÿЃÆüKuöeø[^ÉÃU‰åS»È ƒ=È t‹ƒÃÿЃ;uôhÌè"ú¿‹]üÉÃU‰åƒ= uÇ èµÿÿÿÉАS¸‹\$‹L$ ‹T$̀…À}¸ÿÿÿÿ[ÐVS‹t$ \$‹T$…Òt'‰Ð€:t@€8uú)ÐPRVè´ÿÿÿƒÄ ƒÃ‹Sü…ÒuÛ[^Ã'
: can't load library 'Invalid argument: Over the limits?
No such file or directory.
Permission denied.
Exec format error.

U‰åƒìWVS‹M ƒ}Ž¾¾, ƒ=, „苸V‰Ó̀‰ÇÇEüÿÿÿÿ…ÿ|‰}üƒ}üt{jhÈRhÍÿ1jèÕþÿÿƒÄƒ}üt<
ƒ}ütëBƒ}ü
tƒ}üu4jhäë"jh 됐jh&ë
jh;jè‚þÿÿ»€¸̀ëòƒÆƒ>…Xÿÿÿë>¾, ƒ=, t"jhPÿ6hSjè;þÿÿƒÄƒÆƒ>uà1Û¸̀ëõeð[^_Éà                   /lib/libc.2.2.2ü -5:=1B<T@Z@i8 x †t •Ÿ®x ¼ É´ ×ÌßÌêÌõÌþÌÌÌÌ!Ì+Ì2Ì=ÌFÌOÌYÌaÌlÌuÌ„dÌŸdÌ«€Í€ß€€€=€[€u€—€º€×€ó€€€0€<€s€ª€å€ú€€€€E€k€y€Ž$̤ »$Ñ à$Lëlóldldl)€K€]€„€€»€Ù€ó€€8€U€q€ƒ€–€®€º€ñ€(€c€x€…€€š€Ã€é€÷€   = OlXpatgxo||€†„ˆ—ŒŸ¦”­˜¶œ¾ È¤Õ¨á¬ê°ó´û¸ ¸ |  hÆÁ/ LÇÁE xÆÁX pÆÁk <ÓÁƒ ˜ÓÁš ˆÆÁ® €ÆÁ  ÆÁÕ ´ÑÁí €ÈÁ
ôÊÁ
%
ðÁ+
TÀ0
¸ 8
@‰ÂJ
'ÂR

\
d
ÄÆÁx
tËÁ˜
pÉÁ¬
ÈÁÂ
|ÑÁÚ
XÈÁð
œ-Âú
$  èÅÁ  ÅÁ+ ôÅÁ; ˆÊÁW PÅÁg  y äÂ‚ \ˆÂ Ԁž ¼ÅÁ« àÂµ `ùÁÀ ?ÂÈ TÆÁà <ÕÁ÷ ˜ÔÁ
„áÁ Ì% ¼ 4 ÐàÁ< €`ÃG „`ÃN 8 V Ä e ôàÁm ÅÁ{ DáÁƒ Ì  @âÁ• ¸àÁ ° Œ`Å» @ÅÁÉ ð0ÂÑ ¼ºÁÞ ŒÀì ä¾Áõ Ü@Â
ޏÂ
5Â
œ6Â
X4
 <
„rÂJ
èÂR
¸*Â[
dáÁd
$ÆÁ~
¬@ˆ
äÄÁ•
 âÁž
ۏ§
(ÌÁ´
”`ÅÀ
œ`ÅË
 `ÅÓ
„ÅÁá
8ÑÁø
°(Âݏ €Â ÂܺÁ*ÔÁA°ÅÁN¤`ÅR¨`ÅV¬`ÅZ´`Å^ĺÁfáÁo¸`ÅsÈáÁ|¼`Å€À`Å„Ä`ōÈ`Å‘Ì`Å•pÅÁ¥Ð`Å©Ü`Å­Ø`űà`ŵÔ`Źä`Žè`ÅÁ0ÇÁØ 2Âãì`Åçð`Åëô`Åïø`ÅóÔÁ
€ÉÁü`ÅaÅ!aÅ%aÅ) aÅ-ˆ9aÅ=aÅAaÅEaÅI aÅM$aÅQ(aÅUŒ‰Âl0aÅp,aÅt4aÅx ´aÅÀaÅpâÁ  6ÄaÅ:ÈaÅ>¤ÉÁMÌaÅQÔaÅ\ÐaÅ`ØaÅdÜaÅhàaÅläaÅpèaÅtHÊÁ„¬ºÁ‘ìaÅ•¨5ž ‹Â­pÊÁ¼ôÆ̀ÂÑÜÅÁÞÄÖÁö\ÊÁøaÅðÄÁÔÄÁ0¨ˆÂ<,bÅBŒrÂO "UôˆÂaŒÅÁoð©Àx˜×Á’˜›4bŤ !¬ˆÂ³8bŹÑÁÐèÆÁé¸ÊÁò¬“Âø`bÅþìÂ¬ÎÁ +ÅÁ=€DôâÁL$Sô‰Â`XâÁhð»Áo0ÊÁƒì)ÂŒÜÔÁ¦ÌâÁ®ÀÒÁÔ "ܨâÁä\/Âì`-Âóìü0ð>Â
œÅÁäÉÁ1ÇÁG€O(ÈÁhlÓÁ ÇÁ•8ÐÁ­<ÈÁÈÇÁÜÄbÅåÌò°ÆÁ
ÀÉÁÈbÅ( /ԂÂ8ÐÅÁDhÀLÊÁ`üÉÁsÆÁ€ÌÄÁŒЀܣ1±”1Á·XÏÁÍŒÐÁä(ÅÁöÔ-¤ÅÁx&Â@ÐÁ/ ÈÁGÆÁ[ÈÁuTÇÁŒ”ÈÁ¢ØÇÁ»ÔÓÁߘÆÁóÐÇÁxÇÁ°ÇÁ,¨ÆÁ?¨ÇÁQ„ÀWc "ixùÁtÔÁ‘ÜÍÁ@ ¢ÆÁ±ÜÆÁÉÌÆÁÞ@ÉÁòÔÏÁôÑÁ6 €&ÈÒÁ>ÐÉÁLøÍÁcd•Àilo0ÖÁ‹ÐÁËÁÂHËÁå ÓÁúÉÁäÈÁ!´ÈÁ5¤ÈÁNìÇÁhèËÁ†ÈÇÁ™`ÇÁ¬ÇÁ¿øÁÆT-ÀÍð
Ó”ŠÂâ8 é@ÆÁ°ÕÁ,4ÆÁL "QpÒÁ`¸>ÂiLq/usr/lib/gcc-lib/i386-linux/2.2.2/crt0.o__entryinit_cwdone___shared_dummy__bpe.ogcc2_compiled._laststring.12_re_search.13_old_filpos.14hexsrch.ogcc2_compiled._laststring.6_re_search.7_old_filpos.8clear.oclrtobot.oclrtoeol.ocurses.odelwin.oendwin.ogetch.ogetstr.oinitscr.omove.omvprintw.onewwin.oprintw.orefresh.oscanw.otouchwin.o__main.ogcc2_compiled./usr2/linux/src/gcc-2.2.2/./libgcc2.cint:t1=r1;-2147483648;2147483647;char:t2=r2;0;127;long int:t3=r1;-2147483648;2147483647;unsigned int:t4=r1;0;-1;long unsigned int:t5=r1;0;-1;short int:t6=r1;-32768;32767;long long int:t7=r1;0;-1;short unsigned int:t8=r1;0;65535;long long unsigned int:t9=r1;0;-1;signed char:t10=r1;-128;127;unsigned char:t11=r1;0;255;float:t12=r1;4;0;double:t13=r1;8;0;long double:t14=r1;8;0;void:t15=15reg_class:T16=eNO_REGS:0,AREG:1,DREG:2,CREG:3,BREG:4,\Q_REGS:5,SIREG:6,DIREG:7,INDEX_REGS:8,GENERAL_REGS:9,\FP_TOP_REG:10,FP_SECOND_REG:11,FLOAT_REGS:12,ALL_REGS:13,\LIM_REG_CLASSES:14,;ptrdiff_t:t1size_t:t4wchar_t:t3longlong:T17=s8low:3,0,32;high:3,32,32;;long_long:T18=u8s:17,0,64;ll:7,0,64;;long_long:t18func_ptr:t19=*20=f15__do_global_dtors:F15_exit_dummy_ref:G21=*1__do_global_ctors:F15_initialized.6__main:F15_exit.ogcc2_compiled./usr2/linux/src/gcc-2.2.2/./libgcc2.cint:t1=r1;-2147483648;2147483647;char:t2=r2;0;127;long int:t3=r1;-2147483648;2147483647;unsigned int:t4=r1;0;-1;long unsigned int:t5=r1;0;-1;short int:t6=r1;-32768;32767;long long int:t7=r1;0;-1;short unsigned int:t8=r1;0;65535;long long unsigned int:t9=r1;0;-1;signed char:t10=r1;-128;127;unsigned char:t11=r1;0;255;float:t12=r1;4;0;double:t13=r1;8;0;long double:t14=r1;8;0;void:t15=15reg_class:T16=eNO_REGS:0,AREG:1,DREG:2,CREG:3,BREG:4,\Q_REGS:5,SIREG:6,DIREG:7,INDEX_REGS:8,GENERAL_REGS:9,\FP_TOP_REG:10,FP_SECOND_REG:11,FLOAT_REGS:12,ALL_REGS:13,\LIM_REG_CLASSES:14,;ptrdiff_t:t1size_t:t4wchar_t:t3longlong:T17=s8low:3,0,32;high:3,32,32;;long_long:T18=u8s:17,0,64;ll:7,0,64;;long_long:t18func_ptr:t19=*20=f15_exit_dummy_decl:G1__CTOR_LIST__:G21=ar1;0;1;19__DTOR_LIST__:G21__load.oatexit.obrk.oclose.octype-info.oenviron.oexit.ofprintf.olseek.oopen.oread.osignal.osleep.osprintf.ostdstrbufs.ostreambuf.ostring.otcattr.owrite.o__shared.ogcc2_compiled._disp_xchain__9streambuf_shortbuf__9streambuf_pptr__C9streambuf_gptr__C9streambuf_get_column__9streambuf_flush_all__9streambuf_epptr__C9streambuf_egptr__C9streambuf_ebuf__C9streambuf_doallocbuf__9streambuf_allocbuf__9streambuf__least_marker__9streambuf_donix_open_brk_filpos_not_open_filebuf_endwin_testchar_gethex_xflags__9streambuf_switch_to_get_mode__9streambuf_stossc__9streambuf_put_mode__9streambuf_doallocate__9streambuf_allocate__9streambuf_mvprintw___SHARED_LIBRARIES___bad__C3ios_flags__3iosUl_rdstate__C3ios___3iosP9streambufP7ostream_setf__3iosUlUl__exit_dummy_decl__tty_ch__cin_sbuf___ctype_toupper_good__C3ios_Def_term_tcgetattr_wscanw_saving__12streammarker_delta__12streammarker__$_12streammarker_strspn___do_global_dtors___DTOR_LIST___strcat__res_lflg_LINES__edata___CTOR_LIST___strcmp_flags__C3ios_strchr_filename_strlen_strcpy___do_global_ctors__res_iflg_setf__3iosUl_subwin____sgetmask___new_exitfn_sprintf_touchline__endwin_printw_wrefresh___load_shared_libraries__etext___exit_funcs_stdscr_initscr_strrchr_unset__3ios11state_value_touchwin_fill__C3ios_strpbrk__echoit___underflow_RIGHT_PARM_LEFT_PARM__pfast_width__C3ios_setb__9streambufPcT1i_wgetch_My_term_wclrtobot_wclrtoeol_sigaction_underflow__9backupbuf_set__3iosUc_XN_VS_US_UP_signal_strncmp_SR_strcspn_XB_TE_AL_PARM_VB_UE_unsetf__3iosUl_XX_VE_UC_TA_SO_XT_SC_setg__9streambufPcN21__swflags__UL_RC_SF_TI_overflow__9backupbufi___9backupbufi_XS_SE_PC_IN_KH_edit_ascii_NC_IM_HO_ND_KL_GT_MA__9streambuf$_list_all_LL_CR_CS_BS_NL_BT_IC_KD_MI_KE_HC__rawmode_OS_ED_AL_NS_AM_MS_DA_HZ_DB_CL_DC_CM_KR_DL_KS_EO_DM_DO_CA_BC_wclear_IP_CD_KU_EI_CE_normtty_memmove___shared_libc_v2_2_2_K8_K9__$_9backupbuf_K2_UPPERCASE_K3_K0_K1_K6_K7_K4_readable__3ios____ssetmask_K5_wprintw__vt$streambuf_is_open__3ios_edit_hex___ctype_b_fail__C3ios_pbackfail__9backupbufi_writable__3ios_ttytype_fill__3iosc_tie__3iosP7ostream__cout_sbuf_COLS____brk_addr__end__cerr_sbuf_width__3iosi_fprintf___adjust_column__FUiPCci_cvt_str_DL_PARM_secbuf_write__tty_seekpos__9streambufli_xsetflags__9streambufii__$_3ios__win_NONL_curscr_padn__9streambufci__exit_dummy_ref_precision__C3ios_wrsec_memset_rdsec__vt$filebuf_memcpy_sleep_do_flush__7filebuf_wgetstr_delta__12streammarkerRT0_memchr_seekoff__9streambuflQ23ios8seek_diri_length_memcmp_newwin_wmove_command_find_hex_scanw_rdbuf__C3ios_is_reading__7filebuf_setp__9streambufPcT1_header_unbuffered__9streambufi_set_column__9streambufi_pbump__9streambufi_pbackfail__9streambufi_linebuffered__9streambufi_gbump__9streambufi_UP_PARM_find_string_xput_char__9streambufc_is_open__7filebuf_DOWN_PARM_etext_environ_eof__C3ios_atexit_file_ptr__7filebuf_cur_ptr__7filebuf___nt__C3ios_tie__C3ios___ctype_tolower_werr__set_subwin__read_sgetn__9streambufPci_setbuf__9streambufPci_precision__3iosi_mvwprintw_clear__3iosUc_delwin_ungetfail__9streambuf_unbuffered__9streambuf_pbase__C9streambuf_linebuffered__9streambuf_in_backup__9streambuf_in_avail__9streambuf_have_backup__9streambuf_flush_all_linebuffered__9streambuf_eback__C9streambuf_eNptr__9streambuf_eGptr__9streambuf_eBptr__9streambuf_base__C9streambuf_Bptr__9streambuf_sbrk_hex_2_byte_path_tcsetattr___12streammarkerP9streambuf___overflow_set___opPv__C3ios_xsetflags__9streambufi_xflags__9streambufi_sputc__9streambufi_ignore__9streambufi___9streambufi__sprintw_help_sputbackc__9streambufc_fd__7filebuf_sputn__9streambufPCci_exit_main_unsave_markers__9streambuf_sync__9streambuf_switch_to_main_get_area__9streambuf_switch_to_backup_area__9streambuf_sungetc__9streambuf_snextc__9streambuf_sgetc__9streambuf_sbumpc__9streambuf_out_waiting__9streambuf_have_markers__9streambuf_free_backup_area__9streambuf_Nbase__9streambuf_Gbase__9streambuf_Bbase__9streambuf_lseek_close_dump__vt$backupbuf_edata_set_offset__12streammarkeri_seekmark__9streambufR12streammarkeri_set_streampos__12streammarkerl_end__$_9streambuf__sscans___mainreadme.linux 600 145 1 263 5233114724 12367 0ustar davidsenotherbpe.1.1c is the current man page
bpe is the executable
mklinux is the make script (run ./mklinux)

All else is development leftovers.

Bill Davidsen, [email protected] 7/21/92


  3 Responses to “Category : Linux Files
Archive   : BPE.ZIP
Filename : BPE.TAR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/