v04i002: Patches to prev. posted Screen oriented BPE

Pleschutznig Andreas src at mssx.UUCP
Mon Jul 25 19:19:20 AEST 1988


Posting-number: Volume 4, Issue 2
Submitted-by: "Pleschutznig Andreas" <src at mssx.UUCP>
Archive-name: bpe/unPatch1

[ed-style diffs.  What say we insist on context diffs from now on?  ++bsa]

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

echo x - bpe.diffs
sed 's/^X//' >bpe.diffs <<'*-*-END-of-bpe.diffs-*-*'
X489a
X
X.
X448a
X	mvwprintw(win,18,15,"Q - Quit Program");
X.
X445d
X439,440c
X	mvwprintw(win,7,15,
X		"F - Find string in file (beginning from curr. position)");
X	mvwprintw(win,8,15,"/ - Idem");
X.
X430d
X415d
X405d
X398a
X	}
X.
X397d
X392,394c
X			}
X			if (' ' <= (c = secbuf[i * 16 + j]) && c < DEL)
X				mvprintw(ASCY+i,ASCX+j,"%c", c);
X.
X386a
X			mvprintw(ASCY+i,HEXX+j*3,"%02X",secbuf[i*16+j] & 0xFF);
X		}
X.
X384,385d
X379c
X		mvprintw(ASCY+i,0,"%08lX",filpos+i*16);
X.
X376,377c
X
X	mvprintw(4,0,
X" ADDRESS    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F      ASCII");
X
X	mvprintw(5,0, "=======================================================\
X========================");
X
X.
X373c
X	int	i, j, c;
X.
X357d
X350c
X	}
X.
X334c
X		refresh();
X	}
X	move(2, 0);
X.
X331,332d
X328c
X		}
X.
X324a
X		}
X.
X323d
X295d
X244a
X#endif
X.
X243a
X#ifndef NOKEYPAD
X	printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
X#else
X.
X191a
X	}
X.
X190d
X146a
X#endif
X.
X145a
X#ifdef NOKEYPAD
X	printw("Left ^H - down ^J - up ^K - right ^L - end editing with ^C");
X#else
X.
X134c
X	}
X.
X132d
X93a
X			case '/':
X.
X76c
X	header("BPE Version 1.1",filename,"(C) 1988 MSS Graz");
X.
X72d
X66a
X	clear();
X	refresh();
X.
X63a
X#endif
X.
X62a
X#ifdef NOKEYPAD
X.
X55c
X	}
X.
X51c
X	}
X.
X45,46c
Xchar	**argv;
X.
X28a
X#define		CTRL(c)		((c) ^ 0100)
X#define		DEL		CTRL('?')
X
X#ifdef NOKEYPAD
X#define		KEY_LEFT	CTRL('H')
X#define		KEY_DOWN	CTRL('J')
X#define		KEY_UP		CTRL('K')
X#define		KEY_RIGHT	CTRL('L')
X#define		O_RDWR		2
X#define		cbreak()	crmode()
X#define		beep()		putchar(7)
X#endif
X
X.
X8a
XBUG REPORTS:
X============
X	- The offset count in the first column is wrong,
X	  except for the first line; it's 0x10 too high.
X								(fixed)
X	- The test in disp() if a char is printable, fails
X	  for chars >= 0177.
X								(fixed)
X
X	- Help message for 'H' incorrect			(fixed)
X
X
X.
X7c
X1.0 	first version (seems to do things right)   		andy at mssx
X1.1	some bugs fixed (tks to Maarten)			andy at mssx.uucp
X								maart at cs.vu.nl
X.
Xw
Xq
X
*-*-END-of-bpe.diffs-*-*
echo x - makefile
sed 's/^X//' >makefile <<'*-*-END-of-makefile-*-*'
X#
X# If your Terminals and your curses lib supports keypad()
X# do not define the NOKEYPAD, else do 
XNKEYPAD=dummy
X# NKEYPAD=NOKEYPAD
X
XCFLAGS = -O -D$(NKEYPAD)
XLIBES = -lcurses
XOBJS = bpe.o
XSRCS = bpe.c
XEXEC = bpe
X
X$(EXEC): $(OBJS)
X	cc $(OBJS) -o $(EXEC) $(LIBES)
X
X$(OBJS): $(SRCS)
X	cc -c $(CFLAGS) $(SRCS)
*-*-END-of-makefile-*-*
echo x - readme
sed 's/^X//' >readme <<'*-*-END-of-readme-*-*'
XThis is Version 1.1 for the BPE Program I wrote some time ago,
Xthere has been some bug fixes(tks to maart at cs.vu.nl).
X
XTo generate the new Version of the BPE program type
X
X	ed <bpe.diffs bpe.c
X
Xthen look at the new makefile, and correct the NKEYPAD value to
Xsuit for your System. 
X
X
X
XAny further comments and bug reports are welcomed.
X
X
X
X
XAndreas Pleschutznig
XMicro Systems Software
XGraz, Austria
Xandy at mssx
*-*-END-of-readme-*-*
exit



More information about the Comp.sources.misc mailing list