diff -Nru beav-1.40/beav.1 beav-1.40/beav.1 --- beav-1.40/beav.1 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/beav.1 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -.TH BEAV 1 "" "" \" -*- nroff -*- -.SH NAME -beav \- binary file editor and viewer -.SH SYNOPSIS -.B beav -[file...] -.SH DESCRIPTION -This is a brief description of the minimal set of commands -that are necessary to start using -.IR beav -effectively. -For more information, review the file /usr/share/doc/beav/beav140.txt.gz. -.PP -The \fIfile-visit\fR command,\fB Ctl-X Ctl-V\fR, can be used to read a -file in for editing. The file can also be read in from the -command line; \fBbeav \fR. -.PP -Data is displayed in one or more windows. -These commands can be used to navigate around the windows. -.PP -.RS -\fImove-back-char\fB Ctl-B\fB moves left\fR -.br -\fImove-back-line\fB Ctl-P\fB moves up\fR -.br -\fImove-forw-char\fb Ctl-F\fB moves right\fR -.br -\fImove-forw-line\fB Ctl-N\fB moves down\fR -.br -\fIwindow-delete\fB Ctl-X 0\fB delete window\fR -.br -\fIwindow-expand\fB Ctl-X 1\fB expand window\fR -.br -.RE -.PP -The \fImove-to-byte\fR command,\fB Ctl-X G\fR, will prompt you for a -byte position to move to. -.PP -These commands will insert a zero byte at the cursor -position or delete the byte at that position. -.PP -.RS -\fIinsert-unit\fB Ctl-X I\fR -.br -\fIdelete-forw-unit\fB Esc D\fR -.br -.RE -.PP -The \fIfile-save\fR command,\fB Ctl-X Ctl-S\fR, will save the data to -the file if a change has been made. -.PP -The \fIhelp\fR command,\fB Esc ?\fR, will display a list of all -commands and their current key bindings. -.PP -The \fIabort-cmd\fR command,\fB Ctl-G\fR, will abort any command that -is in operation. -.PP -The \fIquit-no-save\fR command,\fB Ctl-X Ctl-C\fR, will exit beav. -If there is any data that has not been saved you will be warned. -.PP -.SH FILES -/usr/share/doc/beav/beav140.txt.gz - diff -Nru beav-1.40/buffer.c beav-1.40/buffer.c --- beav-1.40/buffer.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/buffer.c 1994-11-30 17:43:35.000000000 +0000 @@ -2,8 +2,6 @@ * Buffer handling. */ -#include -#include #include "def.h" bool onebuf (); @@ -168,7 +166,7 @@ if ((s = ereply (MSG_kill_b, bufn, NBUFN, 0)) != TRUE) return (s); - if ((s = _killbuffer (bufn))) + if (s = _killbuffer (bufn)) writ_echo (okmsg); /* verbose-ness (jam) */ return (s); } @@ -807,7 +805,7 @@ register LINE *lp; char name[NBUFN + 1]; char buf[3]; - //WINDOW *wp; + WINDOW *wp; lp = curwp->w_dotp; /* get the buffer name from the line */ diff -Nru beav-1.40/debian/changelog beav-1.40/debian/changelog --- beav-1.40/debian/changelog 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/debian/changelog 2022-11-23 19:55:42.000000000 +0000 @@ -1,3 +1,10 @@ +beav (1:1.40-18.4) unstable; urgency=medium + + * Non-maintainer upload. + * Convert to 3.0 source format (Closes: #1007694). + + -- Bastian Germann Wed, 23 Nov 2022 20:55:42 +0100 + beav (1:1.40-18.3) unstable; urgency=medium * Non-maintainer upload. diff -Nru beav-1.40/debian/patches/debian.patch beav-1.40/debian/patches/debian.patch --- beav-1.40/debian/patches/debian.patch 1970-01-01 00:00:00.000000000 +0000 +++ beav-1.40/debian/patches/debian.patch 2022-11-23 19:55:42.000000000 +0000 @@ -0,0 +1,1336 @@ +--- /dev/null ++++ beav-1.40/Makefile +@@ -0,0 +1,25 @@ ++# This is the makefile for BSD UNIX ++#CFLAGS= -g -DUNIX ++CFLAGS= -g -DUNIX -Wall ++CC=gcc ++ ++OFILES= basic.o ebcdic.o fileio.o region.o text.o wangpc.o \ ++ buffer.o echo.o language.o main.o search.o tty.o window.o \ ++ cinfo.o extend.o kbd.o spawn.o ttyio.o termio.o tcap.o word.o \ ++ display.o file.o line.o random.o symbol.o ttykbd.o format.o ++ ++ ++CFILES= basic.c ebcdic.c fileio.c region.c text.c wangpc.c \ ++ buffer.c echo.c language.c main.c search.c tty.c window.c \ ++ cinfo.c extend.c kbd.c spawn.c ttyio.c termio.c tcap.c word.c \ ++ display.c file.c line.c random.c symbol.c ttykbd.c ++ ++HFILES= def.h prototyp.h ++ ++beav: $(OFILES) ++ $(CC) $(CFLAGS) $(OFILES) -lncurses -o beav ++ ++clean: ++ rm -f *.o beav ++ ++(OFILES): $(HFILES) +--- /dev/null ++++ beav-1.40/beav.1 +@@ -0,0 +1,63 @@ ++.TH BEAV 1 "" "" \" -*- nroff -*- ++.SH NAME ++beav \- binary file editor and viewer ++.SH SYNOPSIS ++.B beav ++[file...] ++.SH DESCRIPTION ++This is a brief description of the minimal set of commands ++that are necessary to start using ++.IR beav ++effectively. ++For more information, review the file /usr/share/doc/beav/beav140.txt.gz. ++.PP ++The \fIfile-visit\fR command,\fB Ctl-X Ctl-V\fR, can be used to read a ++file in for editing. The file can also be read in from the ++command line; \fBbeav \fR. ++.PP ++Data is displayed in one or more windows. ++These commands can be used to navigate around the windows. ++.PP ++.RS ++\fImove-back-char\fB Ctl-B\fB moves left\fR ++.br ++\fImove-back-line\fB Ctl-P\fB moves up\fR ++.br ++\fImove-forw-char\fb Ctl-F\fB moves right\fR ++.br ++\fImove-forw-line\fB Ctl-N\fB moves down\fR ++.br ++\fIwindow-delete\fB Ctl-X 0\fB delete window\fR ++.br ++\fIwindow-expand\fB Ctl-X 1\fB expand window\fR ++.br ++.RE ++.PP ++The \fImove-to-byte\fR command,\fB Ctl-X G\fR, will prompt you for a ++byte position to move to. ++.PP ++These commands will insert a zero byte at the cursor ++position or delete the byte at that position. ++.PP ++.RS ++\fIinsert-unit\fB Ctl-X I\fR ++.br ++\fIdelete-forw-unit\fB Esc D\fR ++.br ++.RE ++.PP ++The \fIfile-save\fR command,\fB Ctl-X Ctl-S\fR, will save the data to ++the file if a change has been made. ++.PP ++The \fIhelp\fR command,\fB Esc ?\fR, will display a list of all ++commands and their current key bindings. ++.PP ++The \fIabort-cmd\fR command,\fB Ctl-G\fR, will abort any command that ++is in operation. ++.PP ++The \fIquit-no-save\fR command,\fB Ctl-X Ctl-C\fR, will exit beav. ++If there is any data that has not been saved you will be warned. ++.PP ++.SH FILES ++/usr/share/doc/beav/beav140.txt.gz ++ +--- beav-1.40.orig/buffer.c ++++ beav-1.40/buffer.c +@@ -2,6 +2,8 @@ + * Buffer handling. + */ + ++#include ++#include + #include "def.h" + + bool onebuf (); +@@ -166,7 +168,7 @@ killbuffer () + + if ((s = ereply (MSG_kill_b, bufn, NBUFN, 0)) != TRUE) + return (s); +- if (s = _killbuffer (bufn)) ++ if ((s = _killbuffer (bufn))) + writ_echo (okmsg); /* verbose-ness (jam) */ + return (s); + } +@@ -805,7 +807,7 @@ pickone () + register LINE *lp; + char name[NBUFN + 1]; + char buf[3]; +- WINDOW *wp; ++ //WINDOW *wp; + + lp = curwp->w_dotp; /* get the buffer name from the line */ + +--- beav-1.40.orig/def.h ++++ beav-1.40/def.h +@@ -9,11 +9,13 @@ + * The most common reason to edit this file would be to zap + * the definition of CVMVAS or BACKUP. + */ ++#ifndef DEF_DEF ++#define DEF_DEF + #define LINT_ARGS 1 /* enable lint type checking */ +-#include "stdio.h" ++#include + + #ifdef UNIX +-#include "sys/types.h" ++#include + #endif /* UNIX */ + + #define BACKUP 1 /* Make backup file. */ +@@ -39,6 +41,7 @@ + #define D8 uchar /* this had better be a 8 bit quantity */ + #define D16 ushort /* this had better be a 16 bit quantity */ + #define D32 ulong /* this had better be a 32 bit quantity */ ++#define F32 float /* this had better be a 32 bit quantity */ + #define D64 double /* this had better be a 64 bit quantity */ + + /* this define is reserved for the address of a location in the buffer */ +@@ -131,9 +134,9 @@ + * Table sizes, etc. + */ + #define NSHASH 31 /* Symbol table hash size. */ +-#define NFILEN 256 /* Length, file name. */ +-#define NBUFN 13 /* Length, buffer name. */ +-#define NFILE 12 /* Length, file name. */ /* krw */ ++#define NFILEN 4096 /* Length, file name. */ ++#define NBUFN 4097 /* Length, buffer name. */ ++#define NFILE 4096 /* Length, file name. */ /* krw */ + #define NKBDM 256 /* Length, keyboard macro. */ + #define NMSG 512 /* Length, message buffer. */ + #define NPAT 80 /* Length, pattern. */ +@@ -269,9 +272,9 @@ + #define _L 0x04 /* Lower case letter. */ + #define _C 0x08 /* Control. */ + +-#define ISCTRL(c) ((cinfo[(c)]&_C)!=0) +-#define ISUPPER(c) ((cinfo[(c)]&_U)!=0) +-#define ISLOWER(c) ((cinfo[(c)]&_L)!=0) ++#define ISCTRL(c) ((cinfo[(int)(c)]&_C)!=0) ++#define ISUPPER(c) ((cinfo[(int)(c)]&_U)!=0) ++#define ISLOWER(c) ((cinfo[(int)(c)]&_L)!=0) + #define TOUPPER(c) ((c)-0x20) + #define TOLOWER(c) ((c)+0x20) + +@@ -295,6 +298,9 @@ + #define R_BYTE_FMT(wp) (wp -> w_fmt_ptr -> r_byte_fmt) + #define R_POSITIONS(wp) (wp -> w_fmt_ptr -> r_positions) + ++struct vid; ++ ++ + /* + * The symbol table links editing functions + * to names. Entries in the key map point at the symbol +@@ -557,13 +563,7 @@ extern int flush_count; + extern int rowb; + extern char file_off_bad; + +-/* +- * Standard I/O. +- */ +-extern char *malloc (); +-extern char *strcpy (); +-extern char *strcat (); +- + #ifndef NOPROTO + #include "prototyp.h" + #endif /* NOPROTO */ ++#endif +--- beav-1.40.orig/display.c ++++ beav-1.40/display.c +@@ -9,11 +9,14 @@ + * both off, the terminal is a VT52. + */ + ++#include ++#include + #include + #include + #include "def.h" + + D64 get_double (); ++F32 get_float (); + D32 get_long (); + D16 get_int (); + void writ_echo (); +@@ -23,7 +26,6 @@ uint fill_buf (); + uint get_currow (); + uint get_curcol (); + #ifndef NOPROTO +-struct vid; + void ucopy (struct vid *vvp, struct vid *pvp); + void uline (int row, struct vid *vvp, struct vid *pvp); + #else +@@ -40,6 +42,7 @@ extern char MSG_11lX[]; + extern char MSG_11lo[]; + extern char MSG_11ld[]; + extern char MSG_116e[]; ++extern char MSG_106e[]; + extern char MSG_03o[]; + extern char MSG_06o[]; + extern char MSG_011lo[]; +@@ -67,6 +70,7 @@ extern char MSG_curs_oct[]; + extern char MSG_siz_8[]; + extern char MSG_siz_16[]; + extern char MSG_siz_32[]; ++extern char MSG_siz_64[]; + extern char MSG_siz_null[]; + extern char MSG_int_shift[]; + extern char MSG_mot_shift[]; +@@ -170,6 +174,8 @@ vtinit () + exit (1); /* can't continue */ + } + ++ memset(video, 0, sizeof (VIDEO) * 2 * nrow); ++ + vp = &video[0]; + for (i = 0; i < nrow; ++i) + { +@@ -481,6 +487,21 @@ bin_to_text (bin_buf, txt_buf, len, fmt_ + break; + #if FLOAT_DISP + case FLOAT: ++ switch (size) ++ { ++ case DWORDS: ++ { ++ k = 0; ++ for (i = 0; i < len; i += sizeof (F32)) ++ { ++ F32 temp_d; ++ ++ temp_d = get_float (&bin_buf[i]); ++ sprintf (&txt_buf[posn[k++]], MSG_106e, temp_d); ++ } ++ } ++ break; ++ case DOUBLES: + { + /* + * The Intel floating point representation is; +@@ -502,6 +523,8 @@ bin_to_text (bin_buf, txt_buf, len, fmt_ + } + } + break; ++ } ++ break; + #endif + case HEX: + switch (size) +@@ -673,11 +696,45 @@ get_long (w_buf) + } + + #if FLOAT_DISP ++ + /* +-* Get an double from the buffer. ++* Get a float from the buffer. + * Perform the Intel byte shuffle if necessary + */ + ++F32 ++get_float (w_buf) ++ uchar *w_buf; ++ ++{ ++ uchar temp_float[sizeof (F32)]; ++ F32 *fp; ++ int i, siz; ++ ++ fp = (F32 *) temp_float; ++ siz = sizeof (F32); ++ ++ if (curwp->w_intel_mode) ++ { ++ for (i = 0; i <= siz-1; i++) ++ { ++ temp_float[i] = 0xff & w_buf[i]; ++ } ++ } ++ else ++ { ++ for (i = 0; i <= siz-1; i++) ++ { ++ temp_float[(siz - 1) - i] = 0xff & w_buf[i]; ++ } ++ } ++ return (*fp); ++} ++ ++/* ++* Get a double from the buffer. ++* Perform the Intel byte shuffle if necessary ++*/ + D64 + get_double (w_buf) + uchar *w_buf; +@@ -698,7 +755,7 @@ get_double (w_buf) + } + else + { +- for (i = 0; i <= 7; i++) ++ for (i = 0; i <= siz-1; i++) + { + temp_doub[(siz - 1) - i] = 0xff & w_buf[i]; + } +@@ -1246,6 +1303,7 @@ modeline (wp) + + if ((mode == HEX) || + (mode == DECIMAL) || ++ (mode == FLOAT) || + (mode == OCTAL)) + { + switch (size) +@@ -1259,6 +1317,9 @@ modeline (wp) + case DWORDS: + sprintf (posn_buf, MSG_siz_32); + break; ++ case DOUBLES: ++ sprintf (posn_buf, MSG_siz_64); ++ break; + #if RUNCHK + default: + writ_echo (ERR_disp_6); +--- beav-1.40.orig/english.c ++++ beav-1.40/english.c +@@ -258,6 +258,7 @@ char MSG_show_save_buf[] = "show-save-bu + char MSG_unit_size1[] = "display-bytes"; + char MSG_unit_size2[] = "display-words"; + char MSG_unit_size4[] = "display-double-words"; ++char MSG_unit_size8[] = "display-quad-words"; + char MSG_reposition_window[] = "window-reposition"; + char MSG_set_mark[] = "mark-set"; + char MSG_goto_eob[] = "move-to-end"; +--- beav-1.40.orig/extend.c ++++ beav-1.40/extend.c +@@ -1,6 +1,7 @@ + /* + * Extended (M-X) commands. + */ ++#include + #include "def.h" + + extern char MSG_not_now[]; +@@ -25,10 +26,10 @@ extern char MSG_unk_rc[]; + + char *flook (); + +-static char *bindnm = +-{ +- 0 +-}; /* file name for customized key bindings */ ++//static char *bindnm = ++//{ ++// 0 ++//}; /* file name for customized key bindings */ + #endif + + /* +@@ -240,7 +241,7 @@ wallchart (f, n, k) + if ((sp->s_modify & SBOUND) == 0) /* comment out default binding */ + buf[0] = '#'; + cp2 = sp->s_name; /* Add function name. */ +- while (*cp1++ = *cp2++) ++ while ((*cp1++ = *cp2++)) + ; + cp1--; + while (cp1 < &buf[HKEY]) /* Goto column 32. */ +@@ -269,7 +270,7 @@ wallchart (f, n, k) + *cp1++ = ' '; + buf[0] = '#'; + cp2 = sp->s_name; /* Add function name. */ +- while (*cp1++ = *cp2++) ++ while ((*cp1++ = *cp2++)) + ; + cp1--; + while (cp1 < &buf[HENDCOL]) +@@ -373,7 +374,7 @@ check_extend (sfname) + if (fname == NULL) + return; + +- if (bindf = fopen (fname, "r")) ++ if ((bindf = fopen (fname, "r"))) + { + char buffr[80]; + char *buffp; +@@ -409,7 +410,7 @@ check_extend (sfname) + } + else + { +- if (sp = symlookup (funcname)) ++ if ((sp = symlookup (funcname))) + { + if (binding[keyval] != NULL) /* Unbind old, and */ + --binding[keyval]->s_nkey; +@@ -439,7 +440,7 @@ flook (fname, hflag) + register char *home; /* path to home directory */ + register char *path; /* environmental PATH variable */ + register char *sp; /* pointer into path spec */ +- register int i; /* index */ ++ //register int i; /* index */ + static char fspec[NFILEN * 2]; /* full path spec to search */ + char *getenv (); + FILE *bindf; +@@ -456,7 +457,7 @@ flook (fname, hflag) + strcat (fspec, fname); + + /* and try it out */ +- if (bindf = fopen (fspec, "r")) ++ if ((bindf = fopen (fspec, "r"))) + { + fclose (bindf); + return (fspec); +@@ -465,7 +466,7 @@ flook (fname, hflag) + } + + /* always try the current directory first */ +- if (bindf = fopen (fname, "r")) ++ if ((bindf = fopen (fname, "r"))) + { + fclose (bindf); + return (fname); +@@ -490,7 +491,7 @@ flook (fname, hflag) + strcat (fspec, fname); + + /* and try it out */ +- if (bindf = fopen (fspec, "r")) ++ if ((bindf = fopen (fspec, "r"))) + { + fclose (bindf); + return (fspec); +--- beav-1.40.orig/file.c ++++ beav-1.40/file.c +@@ -1,6 +1,7 @@ + /* + * File commands. + */ ++#include + #include + #include + #include +@@ -329,7 +330,10 @@ readin (fname, start, end) + bp->b_flag &= ~BFCHG; /* No change. */ + #endif + if ((start == 0L) && (end == MAXPOS)) +- strcpy (bp->b_fname, fname); ++ { ++ strncpy (bp->b_fname, fname, NFILEN); ++ bp->b_fname[NFILEN - 1] = '\0'; ++ } + else + strcpy (bp->b_fname, MSG_null); + bp->b_file_size = 0; +@@ -337,7 +341,7 @@ readin (fname, start, end) + if ((s = ffropen (fname)) == FIOERR || s == FIOFNF) /* jam */ + goto out; + bp->b_file_size = file_len (); /* get the file lenth */ +- sprintf (buf, MSG_reading, fname); /* jam */ ++ snprintf (buf, NCOL, MSG_reading, fname); /* jam */ + writ_echo (buf); + temp = ffseek (start); + if (temp != start) +--- beav-1.40.orig/fileio.c ++++ beav-1.40/fileio.c +@@ -3,6 +3,7 @@ + */ + + #ifdef UNIX ++#include + #include + #include + #include +@@ -249,9 +250,9 @@ bool + fbackupfile (fname) + char *fname; + { +- char backname[NFILEN]; +- char *source, *backup; +- char buf[NCOL]; ++ unsigned char backname[NFILEN]; ++ unsigned char *source, *backup; ++ unsigned char buf[NCOL]; + + source = fname; + backup = backname; +--- beav-1.40.orig/format.c ++++ beav-1.40/format.c +@@ -171,10 +171,29 @@ uchar decimal_s_32_posn[] = + }; + ROW_FMT decimal_s_32_fmt = + { +- DECIMAL, DWORDS, 4, 16, 4, 4, 10, TRUE, decimal_l_str, decimal_l_str, decimal_str, ++ DECIMAL, DWORDS, 4, 16, 4, 4, 12, TRUE, decimal_l_str, decimal_l_str, decimal_str, + decimal_s_32_posn, 0}; + + #if FLOAT_DISP ++uchar float_32_posn[] = ++{ ++ FC, FC + 16, FC + 32, FC + 48 ++}; ++ ++ROW_FMT float_32_fmt = ++{ ++ FLOAT, DWORDS, 4, 16, 4, 4, 12, TRUE, float_str, decimal_l_str, decimal_str, ++ float_32_posn, 0}; ++ ++uchar float_s_32_posn[] = ++{ ++ FS, FS + 17 ++}; ++ROW_FMT float_s_32_fmt = ++{ ++ FLOAT, DWORDS, 4, 16, 4, 4, 14, TRUE, float_str, decimal_l_str, decimal_str, ++ float_s_32_posn, 0}; ++ + uchar float_64_posn[] = + { + FC, FC + 32 +@@ -338,6 +357,8 @@ init_fmt () + decimal_32_fmt.r_srch_fmt = &decimal_s_32_fmt; + decimal_s_32_fmt.r_srch_fmt = &decimal_32_fmt; + #if FLOAT_DISP ++ float_32_fmt.r_srch_fmt = &float_s_32_fmt; ++ float_s_32_fmt.r_srch_fmt = &float_32_fmt; + float_64_fmt.r_srch_fmt = &float_s_64_fmt; + float_s_64_fmt.r_srch_fmt = &float_64_fmt; + #endif +--- beav-1.40.orig/kbd.c ++++ beav-1.40/kbd.c +@@ -1,6 +1,7 @@ + /* KBD.C + * Terminal independent keyboard handling. + */ ++#include + #include "def.h" + + char *keystrings (); +--- beav-1.40.orig/language.c ++++ beav-1.40/language.c +@@ -258,6 +258,7 @@ char MSG_show_save_buf[] = "show-save-bu + char MSG_unit_size1[] = "display-bytes"; + char MSG_unit_size2[] = "display-words"; + char MSG_unit_size4[] = "display-double-words"; ++char MSG_unit_size8[] = "display-quad-words"; + char MSG_reposition_window[] = "window-reposition"; + char MSG_set_mark[] = "mark-set"; + char MSG_goto_eob[] = "move-to-end"; +--- beav-1.40.orig/line.c ++++ beav-1.40/line.c +@@ -18,6 +18,7 @@ + * nonsense. + */ + ++#include + #include "def.h" + + void l_fix_up (); +--- beav-1.40.orig/main.c ++++ beav-1.40/main.c +@@ -35,6 +35,7 @@ + * + * Mainline, macro commands. + */ ++#include + #include "def.h" + + bool execute (); +@@ -98,7 +99,7 @@ int flush_count = 0; + int flush_num = 500; + int auto_update = 0; + +-void ++int + main (argc, argv) + char *argv[]; + int argc; +@@ -109,7 +110,7 @@ main (argc, argv) + register int n; + register int mflag; + char bname[NBUFN]; +- char initfile[NFILEN]; ++ //char initfile[NFILEN]; + + #if MSDOS + is_wang (); /* Check for computer type */ +@@ -143,7 +144,7 @@ main (argc, argv) + check_extend (NULL); /* check for extended keys */ + #endif + +- if (argc == 1) ++ if (argc <= 1) + { + edinit (bname); + eerase (); +@@ -182,6 +183,8 @@ main (argc, argv) + save_buf_init (); /* initialize save buffer */ + lastflag = 0; /* Fake last flags. */ + ++ writ_echo ("Welcome to BEAV. Esc-? for help, Ctrl-C to quit."); ++ + loop: + update (); + c = getkey (); +@@ -389,6 +392,7 @@ quit (f, n, k) + { + + vttidy (); ++ printf("\n"); + exit (GOOD); + } + +--- beav-1.40.orig/prototyp.h ++++ beav-1.40/prototyp.h +@@ -1,3 +1,8 @@ ++#ifndef PROTOTYP_DEF ++#define PROTOTYP_DEF ++ ++#include "def.h" ++ + extern char backchar (int f, int n, int k); + extern char forwchar (int f, int n, int k); + extern char move_ptr (struct WINDOW *wp, long len, char dot, char fix, char rel); +@@ -116,7 +121,7 @@ extern char ldelete (unsigned long n_byt + extern void lreplace (int n, char c); + extern char lrepl_str (int plen, struct LINE *rstr, struct LINE *mstr); + extern void l_fix_up (struct LINE *line); +-extern void main (int argc, char **argv); ++extern int main (int argc, char **argv); + extern char execute (int c, int f, int n); + extern void edinit (char *bname); + extern char flush_all (void); +@@ -151,6 +156,7 @@ extern char backdel (int f, int n, int k + extern char dispsize1 (void); + extern char dispsize2 (void); + extern char dispsize4 (void); ++extern char dispsize8 (void); + extern char dispswapbyte (int f, int n, int k); + extern char yank (int f, int n, int k); + extern char linkwind (void); +@@ -203,7 +209,9 @@ extern int getkbd (void); + extern void ttykeymapinit (void); + extern char *keystrings (int key); + extern void is_wang (void); ++#ifdef MSDOS + extern int getsysconfig (union REGS *outregs, struct SREGS *segregs); ++#endif + extern char getscreenstate (void); + extern char reposition (void); + extern char nextwind (void); +@@ -222,3 +230,5 @@ extern char backunit (int f, int n, int + extern char forwunit (int f, int n, int k); + extern char delfunit (int f, int n, int k); + extern char delbunit (int f, int n, int k); ++ ++#endif +--- beav-1.40.orig/random.c ++++ beav-1.40/random.c +@@ -6,11 +6,13 @@ + * that they are all command processors. + */ + ++#include + #include "def.h" + + char backdel (); + bool fill_out (); + void bad_key (); ++F32 get_float (); + D64 get_double (); + + +@@ -24,6 +26,7 @@ extern char MSG_03u[]; + extern char MSG_05u[]; + extern char MSG_010lu[]; + extern char MSG_116e[]; ++extern char MSG_106e[]; + extern char MSG_lnk[]; + extern char MSG_unlink[]; + extern char MSG_link[]; +@@ -59,6 +62,7 @@ extern ROW_FMT decimal_8_fmt; + extern ROW_FMT decimal_16_fmt; + extern ROW_FMT decimal_32_fmt; + #if FLOAT_DISP ++extern ROW_FMT float_32_fmt; + extern ROW_FMT float_64_fmt; + #endif + extern ROW_FMT hex_8_fmt; +@@ -138,7 +142,7 @@ twiddle () + + register LINE *dotp; + register short doto; +- char b_per_u, f_buf[4], s_buf[4], i; ++ unsigned char b_per_u, f_buf[4], s_buf[4], i; + + dotp = curwp->w_dotp; + doto = curwp->w_doto; +@@ -154,7 +158,7 @@ twiddle () + /* pick up first unit byte by byte */ + for (i = 0; i < b_per_u; i++) + { +- f_buf[i] = DOT_CHAR (curwp); ++ f_buf[(int)i] = DOT_CHAR (curwp); + move_ptr (curwp, 1L, TRUE, FALSE, TRUE); + } + /* move to the end of the second unit */ +@@ -168,14 +172,14 @@ twiddle () + /* pick up second unit (reverse order) and deposit second unit */ + for (i = 0; i < b_per_u; i++) + { +- s_buf[i] = DOT_CHAR (curwp); +- DOT_CHAR (curwp) = f_buf[b_per_u - 1 - i]; ++ s_buf[(int)i] = DOT_CHAR (curwp); ++ DOT_CHAR (curwp) = f_buf[(int)b_per_u - 1 - i]; + move_ptr (curwp, -1L, TRUE, FALSE, TRUE); + } + /* deposit first unit */ + for (i = 0; i < b_per_u; i++) + { +- DOT_CHAR (curwp) = s_buf[i]; ++ DOT_CHAR (curwp) = s_buf[(int)i]; + move_ptr (curwp, -1L, TRUE, FALSE, TRUE); + } + curwp->w_dotp = dotp; +@@ -567,7 +571,7 @@ selfinsert (f, n, k) + /* get a text representation of the float */ + sprintf (text_buf, MSG_116e, d_val); + /* insert the character that was typed */ +- text_buf[u_offs] = c; ++ text_buf[(int)u_offs] = c; + /* see if scanf get get back a good number */ + + /************************************************ +@@ -601,7 +605,7 @@ selfinsert (f, n, k) + + ptr = (D8 *) & d_val; + move_ptr (curwp, 1L, TRUE, FALSE, TRUE); /* step forward one byte */ +- DOT_CHAR (curwp) = ptr[i] & 0xff; ++ DOT_CHAR (curwp) = ptr[(int)i] & 0xff; + } + + /* restore dot position */ +@@ -704,15 +708,15 @@ dec_chr_ok (char_buf, max_str, chr, pos) + if ((chr < '0') || (chr > '9')) + return (FALSE); + +- char_buf[pos] = chr; /* insert typed char */ ++ char_buf[(int)pos] = chr; /* insert typed char */ + + /* check if number is too big */ +- for (i = 0; max_str[i] != 0; i++) ++ for (i = 0; max_str[(int)i] != 0; i++) + { +- if (char_buf[i] < max_str[i]) ++ if (char_buf[(int)i] < max_str[(int)i]) + break; /* if char is smaller then must be ok */ + +- if (char_buf[i] > max_str[i]) ++ if (char_buf[(int)i] > max_str[(int)i]) + return (FALSE); /* val is too large; ERROR */ + } + return (TRUE); +@@ -767,7 +771,15 @@ ebcdicmode () + bool + floatmode () + { ++ switch (curwp->w_fmt_ptr->r_size) ++ { ++ case DWORDS: ++ curwp->w_fmt_ptr = &float_32_fmt; ++ break; ++ case DOUBLES: + curwp->w_fmt_ptr = &float_64_fmt; ++ break; ++ } + set_mode_vars (); + return (TRUE); + } +@@ -1148,6 +1160,43 @@ dispsize4 () + curwp->w_fmt_ptr = &binary_32_fmt; + break; + ++ case FLOAT: ++ curwp->w_fmt_ptr = &float_32_fmt; ++ break; ++ ++ default: ++ return (TRUE); ++ break; ++ } ++ ++ /* if we are in the middle of a search then use the proper format struc */ ++ if (read_pat_mode) ++ curwp->w_fmt_ptr = curwp->w_fmt_ptr->r_srch_fmt; ++ ++ move_ptr (curwp, 0L, TRUE, TRUE, TRUE); ++ wind_on_dot (curwp); ++ curwp->w_flag = WFHARD; ++ update (); ++ return (TRUE); ++} ++ ++/* ++* Change the size of the display unit to double. ++* Adjust byte shift to the allowable range. ++* Normally bound to "META-8". ++*/ ++bool ++dispsize8 () ++{ ++ curwp->w_disp_shift = 0; /* shift to 0 when changing size */ ++ curwp->w_unit_offset = 0; /* go to end of unit */ ++ ++ switch ((uchar) (R_TYPE (curwp))) ++ { ++ case FLOAT: ++ curwp->w_fmt_ptr = &float_64_fmt; ++ break; ++ + default: + return (TRUE); + break; +--- beav-1.40.orig/region.c ++++ beav-1.40/region.c +@@ -6,6 +6,7 @@ + * commands. Some functions are just for + * internal use. + */ ++#include + #include "def.h" + + bool getregion (); +--- beav-1.40.orig/search.c ++++ beav-1.40/search.c +@@ -4,6 +4,7 @@ + * search commands (both plain and incremental searches + * are supported) and the query-replace command. + */ ++#include + #include "def.h" + + char replaceit (); +@@ -239,7 +240,7 @@ queryrepl (f, n, k) + srch_mode = FALSE; + rplc_mode = TRUE; + cur_prompt = MSG_sch_str; +- if (s = readpattern ()) ++ if ((s = readpattern ())) + { + replaceit (); + } +--- beav-1.40.orig/symbol.c ++++ beav-1.40/symbol.c +@@ -4,6 +4,8 @@ + * The terminal specific parts of building the + * keymap has been moved to a better place. + */ ++#include ++#include + #include "def.h" + + void keyadd (); +@@ -78,6 +80,7 @@ extern char MSG_display_version[]; + extern char MSG_unit_size1[]; + extern char MSG_unit_size2[]; + extern char MSG_unit_size4[]; ++extern char MSG_unit_size8[]; + extern char MSG_reposition_window[]; + extern char MSG_set_mark[]; + extern char MSG_goto_eob[]; +@@ -200,6 +203,7 @@ extern char binarymode (); /* display BI + extern char dispsize1 (); /* display in BYTE format */ + extern char dispsize2 (); /* display in WORD format */ + extern char dispsize4 (); /* display in DWORD format*/ ++extern char dispsize8 (); /* display in DOUBLE format*/ + extern char dispswapbyte (); /* Display swaped bytes pvr */ + extern char yank (); /* Yank back from killbuffer. */ + extern char linkwind (); /* Link all windows on one buffer. */ +@@ -275,105 +279,106 @@ typedef struct + */ + KEY key[] = + { +- KCTRL | 'A', dispshift, MSG_byte_shift, 0, +- KCTRL | 'B', backchar, MSG_back_char, SSRCH | SRPLC, +- KCTRL | 'C', quit, MSG_quit, 0, /* pvr */ +- KCTRL | 'D', forwdel, MSG_forw_del_char, SMOD | SSIZE | SSRCH | SRPLC, +- KCTRL | 'E', dispswapbyte, MSG_toggle_swap, SSRCH | SRPLC, /* pvr */ +- KCTRL | 'F', forwchar, MSG_forw_char, SSRCH | SRPLC, +- KCTRL | 'G', ctrlg, MSG_abort, SSRCH | SRPLC, +- KCTRL | 'I', selfinsert, MSG_ins_self, SMOD | SSRCH | SRPLC, +- KCTRL | 'H', backdel, MSG_back_del_char, SMOD | SSIZE | SSRCH | SRPLC, +- KCTRL | 'L', refresh, MSG_refresh, SSRCH | SRPLC, +- KCTRL | 'N', forwline, MSG_forw_line, SSRCH | SRPLC, +- KCTRL | 'P', backline, MSG_back_line, SSRCH | SRPLC, +- KCTRL | 'Q', quote, MSG_quote, 0, +- KCTRL | 'R', recall, MSG_recall, SSRCH | SRPLC, +- KCTRL | 'T', twiddle, MSG_twiddle, SMOD | SSRCH | SRPLC, +- KCTRL | 'V', forwpage, MSG_forw_page, SRPLC, +- KCTRL | 'W', killregion, MSG_kill_region, SMOD | SSIZE, +- KCTRL | 'Y', yank, MSG_yank, SMOD | SSIZE, +- KCTRL | 'Z', mvdnwind, MSG_down_window, 0, /* fitz */ +- KCTLX | KCTRL | 'A', insert_toggle, MSG_ins_toggle, SSRCH | SRPLC, +- KCTLX | KCTRL | 'B', listbuffers, MSG_display_buffers, 0, +- KCTLX | KCTRL | 'C', quit, MSG_quit, 0, +- KCTLX | KCTRL | 'E', flushnquit, MSG_exit_flush_all, 0, /* fitz */ +- KCTLX | KCTRL | 'F', filename, MSG_set_file_name, SMOD, /* jam */ +- KCTLX | KCTRL | 'I', fileinsert, MSG_file_insert, SMOD | SSIZE, +- KCTLX | KCTRL | 'L', bufsizlock, MSG_buf_size_lock, 0, +- KCTLX | KCTRL | 'M', flush_all, MSG_flush_all, 0, +- KCTLX | KCTRL | 'N', mvdnwind, MSG_down_window, 0, +- KCTLX | KCTRL | 'P', mvupwind, MSG_up_window, 0, +- KCTLX | KCTRL | 'R', fileread, MSG_file_read, 0, +- KCTLX | KCTRL | 'S', filesave, MSG_file_save, 0, +- KCTLX | KCTRL | 'V', filevisit, MSG_file_visit, 0, +- KCTLX | KCTRL | 'W', filewrite, MSG_file_write, 0, +- KCTLX | KCTRL | 'X', swapmark, MSG_swap_dot_and_mark, 0, +- KCTLX | KCTRL | 'Z', shrinkwind, MSG_shrink_window, 0, +- KCTLX | '=', showcpos, MSG_display_position, 0, +- KCTLX | '(', ctlxlp, MSG_start_macro, 0, +- KCTLX | ')', ctlxrp, MSG_end_macro, 0, +- KCTLX | '?', help, MSG_help, 0, +- KCTLX | '0', delwind, MSG_del_window, 0, +- KCTLX | '1', onlywind, MSG_only_window, 0, +- KCTLX | '2', splitwind, MSG_split_window, 0, +- KCTLX | 'B', usebuffer, MSG_use_buffer, 0, +- KCTLX | 'C', spawncli, MSG_spawn_cli, 0, /* fitz */ +- KCTLX | 'E', ctlxe, MSG_execute_macro, 0, +- KCTLX | 'G', gotoline, MSG_goto_line, 0, +- KCTLX | 'I', insertunit, MSG_ins_unit, SMOD | SSIZE | SSRCH | SRPLC, +- KCTLX | 'K', killbuffer, MSG_kill_buffer, 0, +- KCTLX | 'L', load_extend, MSG_load_bindings, 0, +- KCTLX | 'N', nextwind, MSG_forw_window, 0, +- KCTLX | 'P', prevwind, MSG_back_window, 0, +- KCTLX | 'V', viewfile, MSG_view_file, 0, /* jam */ +- KCTLX | 'Z', enlargewind, MSG_enlarge_window, 0, +- KMETA | KCTRL | 'A', asciimode, MSG_ascii_mode, SSRCH | SRPLC, /* pvr */ +- KMETA | KCTRL | 'B', binarymode, MSG_binary_mode, SSRCH | SRPLC, /* pvr */ +- KMETA | KCTRL | 'D', decimalmode, MSG_decimal_mode, SSRCH | SRPLC, /* pvr */ +- KMETA | KCTRL | 'E', ebcdicmode, MSG_ebcdic_mode, SSRCH | SRPLC, /* pvr */ ++ { KCTRL | 'A', dispshift, MSG_byte_shift, 0 }, ++ { KCTRL | 'B', backchar, MSG_back_char, SSRCH | SRPLC }, ++ { KCTRL | 'C', quit, MSG_quit, 0 }, /* pvr */ ++ { KCTRL | 'D', forwdel, MSG_forw_del_char, SMOD | SSIZE | SSRCH | SRPLC }, ++ { KCTRL | 'E', dispswapbyte, MSG_toggle_swap, SSRCH | SRPLC }, /* pvr */ ++ { KCTRL | 'F', forwchar, MSG_forw_char, SSRCH | SRPLC }, ++ { KCTRL | 'G', ctrlg, MSG_abort, SSRCH | SRPLC }, ++ { KCTRL | 'I', selfinsert, MSG_ins_self, SMOD | SSRCH | SRPLC }, ++ { KCTRL | 'H', backdel, MSG_back_del_char, SMOD | SSIZE | SSRCH | SRPLC }, ++ { KCTRL | 'L', refresh, MSG_refresh, SSRCH | SRPLC }, ++ { KCTRL | 'N', forwline, MSG_forw_line, SSRCH | SRPLC }, ++ { KCTRL | 'P', backline, MSG_back_line, SSRCH | SRPLC }, ++ { KCTRL | 'Q', quote, MSG_quote, 0 }, ++ { KCTRL | 'R', recall, MSG_recall, SSRCH | SRPLC }, ++ { KCTRL | 'T', twiddle, MSG_twiddle, SMOD | SSRCH | SRPLC }, ++ { KCTRL | 'V', forwpage, MSG_forw_page, SRPLC }, ++ { KCTRL | 'W', killregion, MSG_kill_region, SMOD | SSIZE }, ++ { KCTRL | 'Y', yank, MSG_yank, SMOD | SSIZE }, ++ { KCTRL | 'Z', mvdnwind, MSG_down_window, 0 }, /* fitz */ ++ { KCTLX | KCTRL | 'A', insert_toggle, MSG_ins_toggle, SSRCH | SRPLC }, ++ { KCTLX | KCTRL | 'B', listbuffers, MSG_display_buffers, 0 }, ++ { KCTLX | KCTRL | 'C', quit, MSG_quit, 0 }, ++ { KCTLX | KCTRL | 'E', flushnquit, MSG_exit_flush_all, 0 }, /* fitz */ ++ { KCTLX | KCTRL | 'F', filename, MSG_set_file_name, SMOD }, /* jam */ ++ { KCTLX | KCTRL | 'I', fileinsert, MSG_file_insert, SMOD | SSIZE }, ++ { KCTLX | KCTRL | 'L', bufsizlock, MSG_buf_size_lock, 0 }, ++ { KCTLX | KCTRL | 'M', flush_all, MSG_flush_all, 0 }, ++ { KCTLX | KCTRL | 'N', mvdnwind, MSG_down_window, 0 }, ++ { KCTLX | KCTRL | 'P', mvupwind, MSG_up_window, 0 }, ++ { KCTLX | KCTRL | 'R', fileread, MSG_file_read, 0 }, ++ { KCTLX | KCTRL | 'S', filesave, MSG_file_save, 0 }, ++ { KCTLX | KCTRL | 'V', filevisit, MSG_file_visit, 0 }, ++ { KCTLX | KCTRL | 'W', filewrite, MSG_file_write, 0 }, ++ { KCTLX | KCTRL | 'X', swapmark, MSG_swap_dot_and_mark, 0 }, ++ { KCTLX | KCTRL | 'Z', shrinkwind, MSG_shrink_window, 0 }, ++ { KCTLX | '=', showcpos, MSG_display_position, 0 }, ++ { KCTLX | '(', ctlxlp, MSG_start_macro, 0 }, ++ { KCTLX | ')', ctlxrp, MSG_end_macro, 0 }, ++ { KCTLX | '?', help, MSG_help, 0 }, ++ { KCTLX | '0', delwind, MSG_del_window, 0 }, ++ { KCTLX | '1', onlywind, MSG_only_window, 0 }, ++ { KCTLX | '2', splitwind, MSG_split_window, 0 }, ++ { KCTLX | 'B', usebuffer, MSG_use_buffer, 0 }, ++ { KCTLX | 'C', spawncli, MSG_spawn_cli, 0 }, /* fitz */ ++ { KCTLX | 'E', ctlxe, MSG_execute_macro, 0 }, ++ { KCTLX | 'G', gotoline, MSG_goto_line, 0 }, ++ { KCTLX | 'I', insertunit, MSG_ins_unit, SMOD | SSIZE | SSRCH | SRPLC }, ++ { KCTLX | 'K', killbuffer, MSG_kill_buffer, 0 }, ++ { KCTLX | 'L', load_extend, MSG_load_bindings, 0 }, ++ { KCTLX | 'N', nextwind, MSG_forw_window, 0 }, ++ { KCTLX | 'P', prevwind, MSG_back_window, 0 }, ++ { KCTLX | 'V', viewfile, MSG_view_file, 0 }, /* jam */ ++ { KCTLX | 'Z', enlargewind, MSG_enlarge_window, 0 }, ++ { KMETA | KCTRL | 'A', asciimode, MSG_ascii_mode, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | KCTRL | 'B', binarymode, MSG_binary_mode, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | KCTRL | 'D', decimalmode, MSG_decimal_mode, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | KCTRL | 'E', ebcdicmode, MSG_ebcdic_mode, SSRCH | SRPLC }, /* pvr */ + #if FLOAT_DISP +- KMETA | KCTRL | 'F', floatmode, MSG_float_mode, SSRCH | SRPLC, /* pvr */ ++ { KMETA | KCTRL | 'F', floatmode, MSG_float_mode, SSRCH | SRPLC }, /* pvr */ + #endif +- KMETA | KCTRL | 'H', hexmode, MSG_hex_mode, SSRCH | SRPLC, /* pvr */ +- KMETA | KCTRL | 'K', delbunit, MSG_back_del_unit, SMOD | SSIZE | SSRCH | SRPLC, +- KMETA | KCTRL | 'N', buffername, MSG_buffer_name, 0, +- KMETA | KCTRL | 'O', octalmode, MSG_octal_mode, SSRCH | SRPLC, /* pvr */ +- KMETA | KCTRL | 'P', n_way_combine, MSG_n_combine, SSIZE | SMOD, /* pvr */ +- KMETA | KCTRL | 'R', screen_rows, MSG_scr_row, 0, /* pvr */ +- KMETA | KCTRL | 'S', n_way_split, MSG_n_split, 0, /* pvr */ +- KMETA | KCTRL | 'V', showversion, MSG_display_version, 0, +- KMETA | KCTRL | 'W', showsavebuf, MSG_show_save_buf, 0, +- KMETA | '1', dispsize1, MSG_unit_size1, SSRCH | SRPLC, /* pvr */ +- KMETA | '2', dispsize2, MSG_unit_size2, SSRCH | SRPLC, /* pvr */ +- KMETA | '4', dispsize4, MSG_unit_size4, SSRCH | SRPLC, /* pvr */ +- KMETA | '!', reposition, MSG_reposition_window, 0, +- KMETA | '.', setmark, MSG_set_mark, 0, +- KMETA | '>', gotoeob, MSG_goto_eob, SSRCH | SRPLC, +- KMETA | '<', gotobob, MSG_goto_bob, SSRCH | SRPLC, +- KMETA | '+', next_buf, MSG_next_buff, 0, +- KMETA | '-', prev_buf, MSG_prev_buff, 0, +- KMETA | '%', queryrepl, MSG_query_replace, SMOD, +- KMETA | '?', wallchart, MSG_display_bindings, 0, +- KMETA | 'A', autosave, MSG_auto_save, 0, +- KMETA | 'B', backunit, MSG_back_unit, SSRCH | SRPLC, +- KMETA | 'C', compare, MSG_compare, 0, +- KMETA | 'D', delfunit, MSG_forw_del_unit, SMOD | SSIZE | SSRCH | SRPLC, +- KMETA | 'F', forwunit, MSG_forw_unit, SSRCH | SRPLC, +- KMETA | 'G', use_buffer, MSG_use_buffer_split, 0, +- KMETA | 'K', bindtokey, MSG_bind_to_key, 0, +- KMETA | 'L', linkwind, MSG_link_windows, 0, +- KMETA | 'O', save_region, MSG_save_region, 0, +- KMETA | 'P', print, MSG_print, 0, +- KMETA | 'R', backsearch, MSG_back_search, 0, +- KMETA | 'S', forwsearch, MSG_forw_search, 0, +- KMETA | 'T', searchagain, MSG_search_again, 0, +- KMETA | 'U', file_visit, MSG_file_visit_split, 0, +- KMETA | 'V', backpage, MSG_back_page, SRPLC, +- KMETA | 'W', copyregion, MSG_copy_region, 0, +- KMETA | 'X', extend, MSG_extended_command, 0, +- KMETA | 'Y', yank_buffer, MSG_yank_buffer, SMOD | SSIZE, +- KMETA | 'Z', mvupwind, MSG_up_window, 0 ++ { KMETA | KCTRL | 'H', hexmode, MSG_hex_mode, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | KCTRL | 'K', delbunit, MSG_back_del_unit, SMOD | SSIZE | SSRCH | SRPLC }, ++ { KMETA | KCTRL | 'N', buffername, MSG_buffer_name, 0 }, ++ { KMETA | KCTRL | 'O', octalmode, MSG_octal_mode, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | KCTRL | 'P', n_way_combine, MSG_n_combine, SSIZE | SMOD }, /* pvr */ ++ { KMETA | KCTRL | 'R', screen_rows, MSG_scr_row, 0 }, /* pvr */ ++ { KMETA | KCTRL | 'S', n_way_split, MSG_n_split, 0 }, /* pvr */ ++ { KMETA | KCTRL | 'V', showversion, MSG_display_version, 0 }, ++ { KMETA | KCTRL | 'W', showsavebuf, MSG_show_save_buf, 0 }, ++ { KMETA | '1', dispsize1, MSG_unit_size1, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | '2', dispsize2, MSG_unit_size2, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | '4', dispsize4, MSG_unit_size4, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | '8', dispsize8, MSG_unit_size8, SSRCH | SRPLC }, /* pvr */ ++ { KMETA | '!', reposition, MSG_reposition_window, 0 }, ++ { KMETA | '.', setmark, MSG_set_mark, 0 }, ++ { KMETA | '>', gotoeob, MSG_goto_eob, SSRCH | SRPLC }, ++ { KMETA | '<', gotobob, MSG_goto_bob, SSRCH | SRPLC }, ++ { KMETA | '+', next_buf, MSG_next_buff, 0 }, ++ { KMETA | '-', prev_buf, MSG_prev_buff, 0 }, ++ { KMETA | '%', queryrepl, MSG_query_replace, SMOD }, ++ { KMETA | '?', wallchart, MSG_display_bindings, 0 }, ++ { KMETA | 'A', autosave, MSG_auto_save, 0 }, ++ { KMETA | 'B', backunit, MSG_back_unit, SSRCH | SRPLC }, ++ { KMETA | 'C', compare, MSG_compare, 0 }, ++ { KMETA | 'D', delfunit, MSG_forw_del_unit, SMOD | SSIZE | SSRCH | SRPLC }, ++ { KMETA | 'F', forwunit, MSG_forw_unit, SSRCH | SRPLC }, ++ { KMETA | 'G', use_buffer, MSG_use_buffer_split, 0 }, ++ { KMETA | 'K', bindtokey, MSG_bind_to_key, 0 }, ++ { KMETA | 'L', linkwind, MSG_link_windows, 0 }, ++ { KMETA | 'O', save_region, MSG_save_region, 0 }, ++ { KMETA | 'P', print, MSG_print, 0 }, ++ { KMETA | 'R', backsearch, MSG_back_search, 0 }, ++ { KMETA | 'S', forwsearch, MSG_forw_search, 0 }, ++ { KMETA | 'T', searchagain, MSG_search_again, 0 }, ++ { KMETA | 'U', file_visit, MSG_file_visit_split, 0 }, ++ { KMETA | 'V', backpage, MSG_back_page, SRPLC }, ++ { KMETA | 'W', copyregion, MSG_copy_region, 0 }, ++ { KMETA | 'X', extend, MSG_extended_command, 0 }, ++ { KMETA | 'Y', yank_buffer, MSG_yank_buffer, SMOD | SSIZE }, ++ { KMETA | 'Z', mvupwind, MSG_up_window, 0 } + }; + + #define NKEY (sizeof(key) / sizeof(key[0])) +--- beav-1.40.orig/tcap.c ++++ beav-1.40/tcap.c +@@ -2,7 +2,10 @@ + for beav + */ + ++#include ++#include + #include "def.h" ++#include "prototyp.h" + + #ifdef UNIX + +@@ -78,7 +81,7 @@ tcapopen () + + if ((tgetent (tcbuf, tv_stype)) != 1) + { +- sprintf (err_str, "Unknown terminal type %s!\r", tv_stype); ++ sprintf (err_str, "Unknown terminal type %s!\n", tv_stype); + puts (err_str); + ttclose (); /* fix in 1.13 */ + exit (1); +@@ -110,7 +113,7 @@ tcapopen () + ttclose (); /* fix in 1.13 */ + exit (1); + } +- printf ("nrow %d, ncol %d\n", nrow, ncol); ++ printf ("nrow %d, ncol %d\r", nrow, ncol); + + if ((ncol = (short) tgetnum ("co")) == -1) + { +--- beav-1.40.orig/termio.c ++++ beav-1.40/termio.c +@@ -8,6 +8,8 @@ + + #ifdef UNIX /* System V */ + ++#include ++#include + #include + #include + #ifdef BSD +@@ -26,7 +28,11 @@ + #include + #define O_NDELAY O_NONBLOCK + #else +-#include ++#ifdef __GLIBC__ ++#include ++#else ++#include ++#endif /* __GLIBC__ */ + #endif /* MINIX */ + #endif /* OS2 */ + #endif /* BSD */ +@@ -52,14 +58,20 @@ struct sgttyb otermio; /* original term + struct sgttyb ntermio; /* charactoristics to use inside */ + struct tchars tchars, tcharsorig; + #else ++#ifdef __GLIBC__ ++#include ++struct termios otermio; ++struct termios ntermio; ++#else + struct termio otermio; /* original terminal characteristics */ + struct termio ntermio; /* charactoristics to use inside */ ++#endif /* __GLIBC__ */ + #endif /* MINIX */ + #endif /* OS2 */ + #endif /* BSD */ + + #ifndef OS2 +-extern errno; /* System error number -- Necessary when compiling in BSD 1.13 */ ++//extern errno; /* System error number -- Necessary when compiling in BSD 1.13 */ + #endif + + int nrow; /* Terminal size, rows. */ +@@ -102,7 +114,7 @@ ttopen () + { + nrow = ttysize.ts_lines; + ncol = ttysize.ts_cols; +-#endif ++#endif /* ULTRIX */ + } + else + { +@@ -125,15 +137,23 @@ ttopen () + tchars.t_stopc = tchars.t_eofc = tchars.t_brkc = -1; + ioctl (0, TIOCSETC, &tchars); + #else ++#ifdef __GLIBC__ ++ tcgetattr(0,&otermio); ++#else + ioctl (0, TCGETA, &otermio);/* save old settings */ ++ ntermio.c_line = otermio.c_line; ++#endif + ntermio.c_iflag = 0; /* setup new settings */ + ntermio.c_oflag = 0; + ntermio.c_cflag = otermio.c_cflag; + ntermio.c_lflag = 0; +- ntermio.c_line = otermio.c_line; + ntermio.c_cc[VMIN] = 1; + ntermio.c_cc[VTIME] = 0; ++#ifdef __GLIBC__ ++ tcsetattr(0,TCSANOW,&ntermio); ++#else + ioctl (0, TCSETAW, &ntermio); /* and activate them */ ++#endif + #endif /* MINIX */ + kbdflgs = fcntl (0, F_GETFL, 0); + kbdpoll = FALSE; +@@ -166,7 +186,11 @@ ttclose () + ioctl (0, TIOCSETC, &tcharsorig) == -1) + printf ("closing ioctl on dev 0 failure, error = %d\n", errno); + #else ++#ifdef __GLIBC__ ++ if( tcsetattr(0,TCSANOW,&otermio) == -1) ++#else + if (ioctl (0, TCSETAW, &otermio) == -1) /* restore terminal settings */ ++#endif + printf ("closing ioctl on dev 0 failure, error = %d\n", errno); + #endif /* MINIX */ + if (fcntl (0, F_SETFL, kbdflgs) == -1) +@@ -271,7 +295,7 @@ static int chr = -1; + #endif + #endif + +-ttgetc () ++int ttgetc () + { + #ifdef OS2 + #ifdef __EMX__ +@@ -333,7 +357,7 @@ ttgetc () + /* typahead(): Check to see if any characters are already in the + keyboard buffer + */ +-ttkeyready () ++int ttkeyready () + { + #ifdef OS2 + #ifdef __EMX__ +--- beav-1.40.orig/text.c ++++ beav-1.40/text.c +@@ -24,12 +24,14 @@ char MSG_03u[] = "%03u"; + char MSG_05u[] = "%05u"; + char MSG_010lu[] = "%010lu"; + char MSG_116e[] = "%+1.16e"; ++char MSG_106e[] = "%+1.6e"; + char MSG_02X[] = "%02X"; + char MSG_04X[] = "%04X"; + char MSG_08lX[] = "%08lX"; + char MSG_siz_8[] = " 8 "; + char MSG_siz_16[] = " 16"; + char MSG_siz_32[] = " 32"; ++char MSG_siz_64[] = " 64"; + char MSG_siz_null[] = " "; + char MSG_int_shift[] = " S%X"; + char MSG_mot_shift[] = " %X"; +--- beav-1.40.orig/tty.c ++++ beav-1.40/tty.c +@@ -16,6 +16,9 @@ void ttcolor (); + extern void tcapopen (); + extern void tcapclose (); /* DR */ + extern void tcapmove (); ++extern void tcapeeop (); ++extern void tcapeeol (); ++extern void tcaprev (); + + #ifdef MSDOS + #include "dos.h" +@@ -118,8 +121,8 @@ ttmove (row, col) + void + tteeol () + { +- char col, row, i; + #ifdef MSDOS ++ char col, row, i; + union REGS regs; + + if (ibm_pc) +--- beav-1.40.orig/ttykbd.c ++++ beav-1.40/ttykbd.c +@@ -67,6 +67,7 @@ extern char MSG_display_version[]; + extern char MSG_unit_size1[]; + extern char MSG_unit_size2[]; + extern char MSG_unit_size4[]; ++extern char MSG_unit_size8[]; + extern char MSG_reposition_window[]; + extern char MSG_set_mark[]; + extern char MSG_goto_eob[]; +--- beav-1.40.orig/window.c ++++ beav-1.40/window.c +@@ -1,6 +1,7 @@ + /* + * Window handling. + */ ++#include + #include "def.h" + + bool mvupwind (); +@@ -288,9 +289,9 @@ splitwind () + register WINDOW *wp; + register int ntru; + register int ntrl; +- register int ntrd; +- register WINDOW *wp1; +- register WINDOW *wp2; ++ //register int ntrd; ++ //register WINDOW *wp1; ++ //register WINDOW *wp2; + char buf[NCOL], buf1[NCOL]; + + if (curwp->w_ntrows < MIN_WIN_ROWS) +--- beav-1.40.orig/word.c ++++ beav-1.40/word.c +@@ -23,7 +23,7 @@ char + backunit (f, n, k) + int f, n, k; + { +- char ret; ++ char ret = 0; + + if (n < 0) + return (forwunit (f, -n, KRANDOM)); diff -Nru beav-1.40/debian/patches/series beav-1.40/debian/patches/series --- beav-1.40/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ beav-1.40/debian/patches/series 2022-11-23 19:55:42.000000000 +0000 @@ -0,0 +1 @@ +debian.patch diff -Nru beav-1.40/debian/source/format beav-1.40/debian/source/format --- beav-1.40/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ beav-1.40/debian/source/format 2022-11-23 19:55:28.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru beav-1.40/def.h beav-1.40/def.h --- beav-1.40/def.h 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/def.h 1994-11-30 17:43:35.000000000 +0000 @@ -9,13 +9,11 @@ * The most common reason to edit this file would be to zap * the definition of CVMVAS or BACKUP. */ -#ifndef DEF_DEF -#define DEF_DEF #define LINT_ARGS 1 /* enable lint type checking */ -#include +#include "stdio.h" #ifdef UNIX -#include +#include "sys/types.h" #endif /* UNIX */ #define BACKUP 1 /* Make backup file. */ @@ -41,7 +39,6 @@ #define D8 uchar /* this had better be a 8 bit quantity */ #define D16 ushort /* this had better be a 16 bit quantity */ #define D32 ulong /* this had better be a 32 bit quantity */ -#define F32 float /* this had better be a 32 bit quantity */ #define D64 double /* this had better be a 64 bit quantity */ /* this define is reserved for the address of a location in the buffer */ @@ -134,9 +131,9 @@ * Table sizes, etc. */ #define NSHASH 31 /* Symbol table hash size. */ -#define NFILEN 4096 /* Length, file name. */ -#define NBUFN 4097 /* Length, buffer name. */ -#define NFILE 4096 /* Length, file name. */ /* krw */ +#define NFILEN 256 /* Length, file name. */ +#define NBUFN 13 /* Length, buffer name. */ +#define NFILE 12 /* Length, file name. */ /* krw */ #define NKBDM 256 /* Length, keyboard macro. */ #define NMSG 512 /* Length, message buffer. */ #define NPAT 80 /* Length, pattern. */ @@ -272,9 +269,9 @@ #define _L 0x04 /* Lower case letter. */ #define _C 0x08 /* Control. */ -#define ISCTRL(c) ((cinfo[(int)(c)]&_C)!=0) -#define ISUPPER(c) ((cinfo[(int)(c)]&_U)!=0) -#define ISLOWER(c) ((cinfo[(int)(c)]&_L)!=0) +#define ISCTRL(c) ((cinfo[(c)]&_C)!=0) +#define ISUPPER(c) ((cinfo[(c)]&_U)!=0) +#define ISLOWER(c) ((cinfo[(c)]&_L)!=0) #define TOUPPER(c) ((c)-0x20) #define TOLOWER(c) ((c)+0x20) @@ -298,9 +295,6 @@ #define R_BYTE_FMT(wp) (wp -> w_fmt_ptr -> r_byte_fmt) #define R_POSITIONS(wp) (wp -> w_fmt_ptr -> r_positions) -struct vid; - - /* * The symbol table links editing functions * to names. Entries in the key map point at the symbol @@ -563,7 +557,13 @@ extern int rowb; extern char file_off_bad; +/* + * Standard I/O. + */ +extern char *malloc (); +extern char *strcpy (); +extern char *strcat (); + #ifndef NOPROTO #include "prototyp.h" #endif /* NOPROTO */ -#endif diff -Nru beav-1.40/display.c beav-1.40/display.c --- beav-1.40/display.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/display.c 1994-11-30 17:43:35.000000000 +0000 @@ -9,14 +9,11 @@ * both off, the terminal is a VT52. */ -#include -#include #include #include #include "def.h" D64 get_double (); -F32 get_float (); D32 get_long (); D16 get_int (); void writ_echo (); @@ -26,6 +23,7 @@ uint get_currow (); uint get_curcol (); #ifndef NOPROTO +struct vid; void ucopy (struct vid *vvp, struct vid *pvp); void uline (int row, struct vid *vvp, struct vid *pvp); #else @@ -42,7 +40,6 @@ extern char MSG_11lo[]; extern char MSG_11ld[]; extern char MSG_116e[]; -extern char MSG_106e[]; extern char MSG_03o[]; extern char MSG_06o[]; extern char MSG_011lo[]; @@ -70,7 +67,6 @@ extern char MSG_siz_8[]; extern char MSG_siz_16[]; extern char MSG_siz_32[]; -extern char MSG_siz_64[]; extern char MSG_siz_null[]; extern char MSG_int_shift[]; extern char MSG_mot_shift[]; @@ -174,8 +170,6 @@ exit (1); /* can't continue */ } - memset(video, 0, sizeof (VIDEO) * 2 * nrow); - vp = &video[0]; for (i = 0; i < nrow; ++i) { @@ -487,21 +481,6 @@ break; #if FLOAT_DISP case FLOAT: - switch (size) - { - case DWORDS: - { - k = 0; - for (i = 0; i < len; i += sizeof (F32)) - { - F32 temp_d; - - temp_d = get_float (&bin_buf[i]); - sprintf (&txt_buf[posn[k++]], MSG_106e, temp_d); - } - } - break; - case DOUBLES: { /* * The Intel floating point representation is; @@ -523,8 +502,6 @@ } } break; - } - break; #endif case HEX: switch (size) @@ -696,45 +673,11 @@ } #if FLOAT_DISP - /* -* Get a float from the buffer. +* Get an double from the buffer. * Perform the Intel byte shuffle if necessary */ -F32 -get_float (w_buf) - uchar *w_buf; - -{ - uchar temp_float[sizeof (F32)]; - F32 *fp; - int i, siz; - - fp = (F32 *) temp_float; - siz = sizeof (F32); - - if (curwp->w_intel_mode) - { - for (i = 0; i <= siz-1; i++) - { - temp_float[i] = 0xff & w_buf[i]; - } - } - else - { - for (i = 0; i <= siz-1; i++) - { - temp_float[(siz - 1) - i] = 0xff & w_buf[i]; - } - } - return (*fp); -} - -/* -* Get a double from the buffer. -* Perform the Intel byte shuffle if necessary -*/ D64 get_double (w_buf) uchar *w_buf; @@ -755,7 +698,7 @@ } else { - for (i = 0; i <= siz-1; i++) + for (i = 0; i <= 7; i++) { temp_doub[(siz - 1) - i] = 0xff & w_buf[i]; } @@ -1303,7 +1246,6 @@ if ((mode == HEX) || (mode == DECIMAL) || - (mode == FLOAT) || (mode == OCTAL)) { switch (size) @@ -1317,9 +1259,6 @@ case DWORDS: sprintf (posn_buf, MSG_siz_32); break; - case DOUBLES: - sprintf (posn_buf, MSG_siz_64); - break; #if RUNCHK default: writ_echo (ERR_disp_6); diff -Nru beav-1.40/english.c beav-1.40/english.c --- beav-1.40/english.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/english.c 1994-11-30 17:43:35.000000000 +0000 @@ -258,7 +258,6 @@ char MSG_unit_size1[] = "display-bytes"; char MSG_unit_size2[] = "display-words"; char MSG_unit_size4[] = "display-double-words"; -char MSG_unit_size8[] = "display-quad-words"; char MSG_reposition_window[] = "window-reposition"; char MSG_set_mark[] = "mark-set"; char MSG_goto_eob[] = "move-to-end"; diff -Nru beav-1.40/extend.c beav-1.40/extend.c --- beav-1.40/extend.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/extend.c 1994-11-30 17:43:35.000000000 +0000 @@ -1,7 +1,6 @@ /* * Extended (M-X) commands. */ -#include #include "def.h" extern char MSG_not_now[]; @@ -26,10 +25,10 @@ char *flook (); -//static char *bindnm = -//{ -// 0 -//}; /* file name for customized key bindings */ +static char *bindnm = +{ + 0 +}; /* file name for customized key bindings */ #endif /* @@ -241,7 +240,7 @@ if ((sp->s_modify & SBOUND) == 0) /* comment out default binding */ buf[0] = '#'; cp2 = sp->s_name; /* Add function name. */ - while ((*cp1++ = *cp2++)) + while (*cp1++ = *cp2++) ; cp1--; while (cp1 < &buf[HKEY]) /* Goto column 32. */ @@ -270,7 +269,7 @@ *cp1++ = ' '; buf[0] = '#'; cp2 = sp->s_name; /* Add function name. */ - while ((*cp1++ = *cp2++)) + while (*cp1++ = *cp2++) ; cp1--; while (cp1 < &buf[HENDCOL]) @@ -374,7 +373,7 @@ if (fname == NULL) return; - if ((bindf = fopen (fname, "r"))) + if (bindf = fopen (fname, "r")) { char buffr[80]; char *buffp; @@ -410,7 +409,7 @@ } else { - if ((sp = symlookup (funcname))) + if (sp = symlookup (funcname)) { if (binding[keyval] != NULL) /* Unbind old, and */ --binding[keyval]->s_nkey; @@ -440,7 +439,7 @@ register char *home; /* path to home directory */ register char *path; /* environmental PATH variable */ register char *sp; /* pointer into path spec */ - //register int i; /* index */ + register int i; /* index */ static char fspec[NFILEN * 2]; /* full path spec to search */ char *getenv (); FILE *bindf; @@ -457,7 +456,7 @@ strcat (fspec, fname); /* and try it out */ - if ((bindf = fopen (fspec, "r"))) + if (bindf = fopen (fspec, "r")) { fclose (bindf); return (fspec); @@ -466,7 +465,7 @@ } /* always try the current directory first */ - if ((bindf = fopen (fname, "r"))) + if (bindf = fopen (fname, "r")) { fclose (bindf); return (fname); @@ -491,7 +490,7 @@ strcat (fspec, fname); /* and try it out */ - if ((bindf = fopen (fspec, "r"))) + if (bindf = fopen (fspec, "r")) { fclose (bindf); return (fspec); diff -Nru beav-1.40/file.c beav-1.40/file.c --- beav-1.40/file.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/file.c 1994-11-30 17:43:35.000000000 +0000 @@ -1,7 +1,6 @@ /* * File commands. */ -#include #include #include #include @@ -330,10 +329,7 @@ bp->b_flag &= ~BFCHG; /* No change. */ #endif if ((start == 0L) && (end == MAXPOS)) - { - strncpy (bp->b_fname, fname, NFILEN); - bp->b_fname[NFILEN - 1] = '\0'; - } + strcpy (bp->b_fname, fname); else strcpy (bp->b_fname, MSG_null); bp->b_file_size = 0; @@ -341,7 +337,7 @@ if ((s = ffropen (fname)) == FIOERR || s == FIOFNF) /* jam */ goto out; bp->b_file_size = file_len (); /* get the file lenth */ - snprintf (buf, NCOL, MSG_reading, fname); /* jam */ + sprintf (buf, MSG_reading, fname); /* jam */ writ_echo (buf); temp = ffseek (start); if (temp != start) diff -Nru beav-1.40/fileio.c beav-1.40/fileio.c --- beav-1.40/fileio.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/fileio.c 1994-11-30 17:43:35.000000000 +0000 @@ -3,7 +3,6 @@ */ #ifdef UNIX -#include #include #include #include @@ -250,9 +249,9 @@ fbackupfile (fname) char *fname; { - unsigned char backname[NFILEN]; - unsigned char *source, *backup; - unsigned char buf[NCOL]; + char backname[NFILEN]; + char *source, *backup; + char buf[NCOL]; source = fname; backup = backname; diff -Nru beav-1.40/format.c beav-1.40/format.c --- beav-1.40/format.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/format.c 1994-11-30 17:43:35.000000000 +0000 @@ -171,29 +171,10 @@ }; ROW_FMT decimal_s_32_fmt = { - DECIMAL, DWORDS, 4, 16, 4, 4, 12, TRUE, decimal_l_str, decimal_l_str, decimal_str, + DECIMAL, DWORDS, 4, 16, 4, 4, 10, TRUE, decimal_l_str, decimal_l_str, decimal_str, decimal_s_32_posn, 0}; #if FLOAT_DISP -uchar float_32_posn[] = -{ - FC, FC + 16, FC + 32, FC + 48 -}; - -ROW_FMT float_32_fmt = -{ - FLOAT, DWORDS, 4, 16, 4, 4, 12, TRUE, float_str, decimal_l_str, decimal_str, - float_32_posn, 0}; - -uchar float_s_32_posn[] = -{ - FS, FS + 17 -}; -ROW_FMT float_s_32_fmt = -{ - FLOAT, DWORDS, 4, 16, 4, 4, 14, TRUE, float_str, decimal_l_str, decimal_str, - float_s_32_posn, 0}; - uchar float_64_posn[] = { FC, FC + 32 @@ -357,8 +338,6 @@ decimal_32_fmt.r_srch_fmt = &decimal_s_32_fmt; decimal_s_32_fmt.r_srch_fmt = &decimal_32_fmt; #if FLOAT_DISP - float_32_fmt.r_srch_fmt = &float_s_32_fmt; - float_s_32_fmt.r_srch_fmt = &float_32_fmt; float_64_fmt.r_srch_fmt = &float_s_64_fmt; float_s_64_fmt.r_srch_fmt = &float_64_fmt; #endif diff -Nru beav-1.40/kbd.c beav-1.40/kbd.c --- beav-1.40/kbd.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/kbd.c 1994-11-30 17:43:35.000000000 +0000 @@ -1,7 +1,6 @@ /* KBD.C * Terminal independent keyboard handling. */ -#include #include "def.h" char *keystrings (); diff -Nru beav-1.40/language.c beav-1.40/language.c --- beav-1.40/language.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/language.c 1994-11-30 17:43:35.000000000 +0000 @@ -258,7 +258,6 @@ char MSG_unit_size1[] = "display-bytes"; char MSG_unit_size2[] = "display-words"; char MSG_unit_size4[] = "display-double-words"; -char MSG_unit_size8[] = "display-quad-words"; char MSG_reposition_window[] = "window-reposition"; char MSG_set_mark[] = "mark-set"; char MSG_goto_eob[] = "move-to-end"; diff -Nru beav-1.40/line.c beav-1.40/line.c --- beav-1.40/line.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/line.c 1994-11-30 17:43:35.000000000 +0000 @@ -18,7 +18,6 @@ * nonsense. */ -#include #include "def.h" void l_fix_up (); diff -Nru beav-1.40/main.c beav-1.40/main.c --- beav-1.40/main.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/main.c 1994-11-30 17:43:35.000000000 +0000 @@ -35,7 +35,6 @@ * * Mainline, macro commands. */ -#include #include "def.h" bool execute (); @@ -99,7 +98,7 @@ int flush_num = 500; int auto_update = 0; -int +void main (argc, argv) char *argv[]; int argc; @@ -110,7 +109,7 @@ register int n; register int mflag; char bname[NBUFN]; - //char initfile[NFILEN]; + char initfile[NFILEN]; #if MSDOS is_wang (); /* Check for computer type */ @@ -144,7 +143,7 @@ check_extend (NULL); /* check for extended keys */ #endif - if (argc <= 1) + if (argc == 1) { edinit (bname); eerase (); @@ -183,8 +182,6 @@ save_buf_init (); /* initialize save buffer */ lastflag = 0; /* Fake last flags. */ - writ_echo ("Welcome to BEAV. Esc-? for help, Ctrl-C to quit."); - loop: update (); c = getkey (); @@ -392,7 +389,6 @@ { vttidy (); - printf("\n"); exit (GOOD); } diff -Nru beav-1.40/Makefile beav-1.40/Makefile --- beav-1.40/Makefile 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -# This is the makefile for BSD UNIX -#CFLAGS= -g -DUNIX -CFLAGS= -g -DUNIX -Wall -CC=gcc - -OFILES= basic.o ebcdic.o fileio.o region.o text.o wangpc.o \ - buffer.o echo.o language.o main.o search.o tty.o window.o \ - cinfo.o extend.o kbd.o spawn.o ttyio.o termio.o tcap.o word.o \ - display.o file.o line.o random.o symbol.o ttykbd.o format.o - - -CFILES= basic.c ebcdic.c fileio.c region.c text.c wangpc.c \ - buffer.c echo.c language.c main.c search.c tty.c window.c \ - cinfo.c extend.c kbd.c spawn.c ttyio.c termio.c tcap.c word.c \ - display.c file.c line.c random.c symbol.c ttykbd.c - -HFILES= def.h prototyp.h - -beav: $(OFILES) - $(CC) $(CFLAGS) $(OFILES) -lncurses -o beav - -clean: - rm -f *.o beav - -(OFILES): $(HFILES) diff -Nru beav-1.40/prototyp.h beav-1.40/prototyp.h --- beav-1.40/prototyp.h 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/prototyp.h 1994-11-30 17:43:35.000000000 +0000 @@ -1,8 +1,3 @@ -#ifndef PROTOTYP_DEF -#define PROTOTYP_DEF - -#include "def.h" - extern char backchar (int f, int n, int k); extern char forwchar (int f, int n, int k); extern char move_ptr (struct WINDOW *wp, long len, char dot, char fix, char rel); @@ -121,7 +116,7 @@ extern void lreplace (int n, char c); extern char lrepl_str (int plen, struct LINE *rstr, struct LINE *mstr); extern void l_fix_up (struct LINE *line); -extern int main (int argc, char **argv); +extern void main (int argc, char **argv); extern char execute (int c, int f, int n); extern void edinit (char *bname); extern char flush_all (void); @@ -156,7 +151,6 @@ extern char dispsize1 (void); extern char dispsize2 (void); extern char dispsize4 (void); -extern char dispsize8 (void); extern char dispswapbyte (int f, int n, int k); extern char yank (int f, int n, int k); extern char linkwind (void); @@ -209,9 +203,7 @@ extern void ttykeymapinit (void); extern char *keystrings (int key); extern void is_wang (void); -#ifdef MSDOS extern int getsysconfig (union REGS *outregs, struct SREGS *segregs); -#endif extern char getscreenstate (void); extern char reposition (void); extern char nextwind (void); @@ -230,5 +222,3 @@ extern char forwunit (int f, int n, int k); extern char delfunit (int f, int n, int k); extern char delbunit (int f, int n, int k); - -#endif diff -Nru beav-1.40/random.c beav-1.40/random.c --- beav-1.40/random.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/random.c 1994-11-30 17:43:35.000000000 +0000 @@ -6,13 +6,11 @@ * that they are all command processors. */ -#include #include "def.h" char backdel (); bool fill_out (); void bad_key (); -F32 get_float (); D64 get_double (); @@ -26,7 +24,6 @@ extern char MSG_05u[]; extern char MSG_010lu[]; extern char MSG_116e[]; -extern char MSG_106e[]; extern char MSG_lnk[]; extern char MSG_unlink[]; extern char MSG_link[]; @@ -62,7 +59,6 @@ extern ROW_FMT decimal_16_fmt; extern ROW_FMT decimal_32_fmt; #if FLOAT_DISP -extern ROW_FMT float_32_fmt; extern ROW_FMT float_64_fmt; #endif extern ROW_FMT hex_8_fmt; @@ -142,7 +138,7 @@ register LINE *dotp; register short doto; - unsigned char b_per_u, f_buf[4], s_buf[4], i; + char b_per_u, f_buf[4], s_buf[4], i; dotp = curwp->w_dotp; doto = curwp->w_doto; @@ -158,7 +154,7 @@ /* pick up first unit byte by byte */ for (i = 0; i < b_per_u; i++) { - f_buf[(int)i] = DOT_CHAR (curwp); + f_buf[i] = DOT_CHAR (curwp); move_ptr (curwp, 1L, TRUE, FALSE, TRUE); } /* move to the end of the second unit */ @@ -172,14 +168,14 @@ /* pick up second unit (reverse order) and deposit second unit */ for (i = 0; i < b_per_u; i++) { - s_buf[(int)i] = DOT_CHAR (curwp); - DOT_CHAR (curwp) = f_buf[(int)b_per_u - 1 - i]; + s_buf[i] = DOT_CHAR (curwp); + DOT_CHAR (curwp) = f_buf[b_per_u - 1 - i]; move_ptr (curwp, -1L, TRUE, FALSE, TRUE); } /* deposit first unit */ for (i = 0; i < b_per_u; i++) { - DOT_CHAR (curwp) = s_buf[(int)i]; + DOT_CHAR (curwp) = s_buf[i]; move_ptr (curwp, -1L, TRUE, FALSE, TRUE); } curwp->w_dotp = dotp; @@ -571,7 +567,7 @@ /* get a text representation of the float */ sprintf (text_buf, MSG_116e, d_val); /* insert the character that was typed */ - text_buf[(int)u_offs] = c; + text_buf[u_offs] = c; /* see if scanf get get back a good number */ /************************************************ @@ -605,7 +601,7 @@ ptr = (D8 *) & d_val; move_ptr (curwp, 1L, TRUE, FALSE, TRUE); /* step forward one byte */ - DOT_CHAR (curwp) = ptr[(int)i] & 0xff; + DOT_CHAR (curwp) = ptr[i] & 0xff; } /* restore dot position */ @@ -708,15 +704,15 @@ if ((chr < '0') || (chr > '9')) return (FALSE); - char_buf[(int)pos] = chr; /* insert typed char */ + char_buf[pos] = chr; /* insert typed char */ /* check if number is too big */ - for (i = 0; max_str[(int)i] != 0; i++) + for (i = 0; max_str[i] != 0; i++) { - if (char_buf[(int)i] < max_str[(int)i]) + if (char_buf[i] < max_str[i]) break; /* if char is smaller then must be ok */ - if (char_buf[(int)i] > max_str[(int)i]) + if (char_buf[i] > max_str[i]) return (FALSE); /* val is too large; ERROR */ } return (TRUE); @@ -771,15 +767,7 @@ bool floatmode () { - switch (curwp->w_fmt_ptr->r_size) - { - case DWORDS: - curwp->w_fmt_ptr = &float_32_fmt; - break; - case DOUBLES: curwp->w_fmt_ptr = &float_64_fmt; - break; - } set_mode_vars (); return (TRUE); } @@ -1160,43 +1148,6 @@ curwp->w_fmt_ptr = &binary_32_fmt; break; - case FLOAT: - curwp->w_fmt_ptr = &float_32_fmt; - break; - - default: - return (TRUE); - break; - } - - /* if we are in the middle of a search then use the proper format struc */ - if (read_pat_mode) - curwp->w_fmt_ptr = curwp->w_fmt_ptr->r_srch_fmt; - - move_ptr (curwp, 0L, TRUE, TRUE, TRUE); - wind_on_dot (curwp); - curwp->w_flag = WFHARD; - update (); - return (TRUE); -} - -/* -* Change the size of the display unit to double. -* Adjust byte shift to the allowable range. -* Normally bound to "META-8". -*/ -bool -dispsize8 () -{ - curwp->w_disp_shift = 0; /* shift to 0 when changing size */ - curwp->w_unit_offset = 0; /* go to end of unit */ - - switch ((uchar) (R_TYPE (curwp))) - { - case FLOAT: - curwp->w_fmt_ptr = &float_64_fmt; - break; - default: return (TRUE); break; diff -Nru beav-1.40/region.c beav-1.40/region.c --- beav-1.40/region.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/region.c 1994-11-30 17:43:35.000000000 +0000 @@ -6,7 +6,6 @@ * commands. Some functions are just for * internal use. */ -#include #include "def.h" bool getregion (); diff -Nru beav-1.40/search.c beav-1.40/search.c --- beav-1.40/search.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/search.c 1994-11-30 17:43:35.000000000 +0000 @@ -4,7 +4,6 @@ * search commands (both plain and incremental searches * are supported) and the query-replace command. */ -#include #include "def.h" char replaceit (); @@ -240,7 +239,7 @@ srch_mode = FALSE; rplc_mode = TRUE; cur_prompt = MSG_sch_str; - if ((s = readpattern ())) + if (s = readpattern ()) { replaceit (); } diff -Nru beav-1.40/symbol.c beav-1.40/symbol.c --- beav-1.40/symbol.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/symbol.c 1994-11-30 17:43:35.000000000 +0000 @@ -4,8 +4,6 @@ * The terminal specific parts of building the * keymap has been moved to a better place. */ -#include -#include #include "def.h" void keyadd (); @@ -80,7 +78,6 @@ extern char MSG_unit_size1[]; extern char MSG_unit_size2[]; extern char MSG_unit_size4[]; -extern char MSG_unit_size8[]; extern char MSG_reposition_window[]; extern char MSG_set_mark[]; extern char MSG_goto_eob[]; @@ -203,7 +200,6 @@ extern char dispsize1 (); /* display in BYTE format */ extern char dispsize2 (); /* display in WORD format */ extern char dispsize4 (); /* display in DWORD format*/ -extern char dispsize8 (); /* display in DOUBLE format*/ extern char dispswapbyte (); /* Display swaped bytes pvr */ extern char yank (); /* Yank back from killbuffer. */ extern char linkwind (); /* Link all windows on one buffer. */ @@ -279,106 +275,105 @@ */ KEY key[] = { - { KCTRL | 'A', dispshift, MSG_byte_shift, 0 }, - { KCTRL | 'B', backchar, MSG_back_char, SSRCH | SRPLC }, - { KCTRL | 'C', quit, MSG_quit, 0 }, /* pvr */ - { KCTRL | 'D', forwdel, MSG_forw_del_char, SMOD | SSIZE | SSRCH | SRPLC }, - { KCTRL | 'E', dispswapbyte, MSG_toggle_swap, SSRCH | SRPLC }, /* pvr */ - { KCTRL | 'F', forwchar, MSG_forw_char, SSRCH | SRPLC }, - { KCTRL | 'G', ctrlg, MSG_abort, SSRCH | SRPLC }, - { KCTRL | 'I', selfinsert, MSG_ins_self, SMOD | SSRCH | SRPLC }, - { KCTRL | 'H', backdel, MSG_back_del_char, SMOD | SSIZE | SSRCH | SRPLC }, - { KCTRL | 'L', refresh, MSG_refresh, SSRCH | SRPLC }, - { KCTRL | 'N', forwline, MSG_forw_line, SSRCH | SRPLC }, - { KCTRL | 'P', backline, MSG_back_line, SSRCH | SRPLC }, - { KCTRL | 'Q', quote, MSG_quote, 0 }, - { KCTRL | 'R', recall, MSG_recall, SSRCH | SRPLC }, - { KCTRL | 'T', twiddle, MSG_twiddle, SMOD | SSRCH | SRPLC }, - { KCTRL | 'V', forwpage, MSG_forw_page, SRPLC }, - { KCTRL | 'W', killregion, MSG_kill_region, SMOD | SSIZE }, - { KCTRL | 'Y', yank, MSG_yank, SMOD | SSIZE }, - { KCTRL | 'Z', mvdnwind, MSG_down_window, 0 }, /* fitz */ - { KCTLX | KCTRL | 'A', insert_toggle, MSG_ins_toggle, SSRCH | SRPLC }, - { KCTLX | KCTRL | 'B', listbuffers, MSG_display_buffers, 0 }, - { KCTLX | KCTRL | 'C', quit, MSG_quit, 0 }, - { KCTLX | KCTRL | 'E', flushnquit, MSG_exit_flush_all, 0 }, /* fitz */ - { KCTLX | KCTRL | 'F', filename, MSG_set_file_name, SMOD }, /* jam */ - { KCTLX | KCTRL | 'I', fileinsert, MSG_file_insert, SMOD | SSIZE }, - { KCTLX | KCTRL | 'L', bufsizlock, MSG_buf_size_lock, 0 }, - { KCTLX | KCTRL | 'M', flush_all, MSG_flush_all, 0 }, - { KCTLX | KCTRL | 'N', mvdnwind, MSG_down_window, 0 }, - { KCTLX | KCTRL | 'P', mvupwind, MSG_up_window, 0 }, - { KCTLX | KCTRL | 'R', fileread, MSG_file_read, 0 }, - { KCTLX | KCTRL | 'S', filesave, MSG_file_save, 0 }, - { KCTLX | KCTRL | 'V', filevisit, MSG_file_visit, 0 }, - { KCTLX | KCTRL | 'W', filewrite, MSG_file_write, 0 }, - { KCTLX | KCTRL | 'X', swapmark, MSG_swap_dot_and_mark, 0 }, - { KCTLX | KCTRL | 'Z', shrinkwind, MSG_shrink_window, 0 }, - { KCTLX | '=', showcpos, MSG_display_position, 0 }, - { KCTLX | '(', ctlxlp, MSG_start_macro, 0 }, - { KCTLX | ')', ctlxrp, MSG_end_macro, 0 }, - { KCTLX | '?', help, MSG_help, 0 }, - { KCTLX | '0', delwind, MSG_del_window, 0 }, - { KCTLX | '1', onlywind, MSG_only_window, 0 }, - { KCTLX | '2', splitwind, MSG_split_window, 0 }, - { KCTLX | 'B', usebuffer, MSG_use_buffer, 0 }, - { KCTLX | 'C', spawncli, MSG_spawn_cli, 0 }, /* fitz */ - { KCTLX | 'E', ctlxe, MSG_execute_macro, 0 }, - { KCTLX | 'G', gotoline, MSG_goto_line, 0 }, - { KCTLX | 'I', insertunit, MSG_ins_unit, SMOD | SSIZE | SSRCH | SRPLC }, - { KCTLX | 'K', killbuffer, MSG_kill_buffer, 0 }, - { KCTLX | 'L', load_extend, MSG_load_bindings, 0 }, - { KCTLX | 'N', nextwind, MSG_forw_window, 0 }, - { KCTLX | 'P', prevwind, MSG_back_window, 0 }, - { KCTLX | 'V', viewfile, MSG_view_file, 0 }, /* jam */ - { KCTLX | 'Z', enlargewind, MSG_enlarge_window, 0 }, - { KMETA | KCTRL | 'A', asciimode, MSG_ascii_mode, SSRCH | SRPLC }, /* pvr */ - { KMETA | KCTRL | 'B', binarymode, MSG_binary_mode, SSRCH | SRPLC }, /* pvr */ - { KMETA | KCTRL | 'D', decimalmode, MSG_decimal_mode, SSRCH | SRPLC }, /* pvr */ - { KMETA | KCTRL | 'E', ebcdicmode, MSG_ebcdic_mode, SSRCH | SRPLC }, /* pvr */ + KCTRL | 'A', dispshift, MSG_byte_shift, 0, + KCTRL | 'B', backchar, MSG_back_char, SSRCH | SRPLC, + KCTRL | 'C', quit, MSG_quit, 0, /* pvr */ + KCTRL | 'D', forwdel, MSG_forw_del_char, SMOD | SSIZE | SSRCH | SRPLC, + KCTRL | 'E', dispswapbyte, MSG_toggle_swap, SSRCH | SRPLC, /* pvr */ + KCTRL | 'F', forwchar, MSG_forw_char, SSRCH | SRPLC, + KCTRL | 'G', ctrlg, MSG_abort, SSRCH | SRPLC, + KCTRL | 'I', selfinsert, MSG_ins_self, SMOD | SSRCH | SRPLC, + KCTRL | 'H', backdel, MSG_back_del_char, SMOD | SSIZE | SSRCH | SRPLC, + KCTRL | 'L', refresh, MSG_refresh, SSRCH | SRPLC, + KCTRL | 'N', forwline, MSG_forw_line, SSRCH | SRPLC, + KCTRL | 'P', backline, MSG_back_line, SSRCH | SRPLC, + KCTRL | 'Q', quote, MSG_quote, 0, + KCTRL | 'R', recall, MSG_recall, SSRCH | SRPLC, + KCTRL | 'T', twiddle, MSG_twiddle, SMOD | SSRCH | SRPLC, + KCTRL | 'V', forwpage, MSG_forw_page, SRPLC, + KCTRL | 'W', killregion, MSG_kill_region, SMOD | SSIZE, + KCTRL | 'Y', yank, MSG_yank, SMOD | SSIZE, + KCTRL | 'Z', mvdnwind, MSG_down_window, 0, /* fitz */ + KCTLX | KCTRL | 'A', insert_toggle, MSG_ins_toggle, SSRCH | SRPLC, + KCTLX | KCTRL | 'B', listbuffers, MSG_display_buffers, 0, + KCTLX | KCTRL | 'C', quit, MSG_quit, 0, + KCTLX | KCTRL | 'E', flushnquit, MSG_exit_flush_all, 0, /* fitz */ + KCTLX | KCTRL | 'F', filename, MSG_set_file_name, SMOD, /* jam */ + KCTLX | KCTRL | 'I', fileinsert, MSG_file_insert, SMOD | SSIZE, + KCTLX | KCTRL | 'L', bufsizlock, MSG_buf_size_lock, 0, + KCTLX | KCTRL | 'M', flush_all, MSG_flush_all, 0, + KCTLX | KCTRL | 'N', mvdnwind, MSG_down_window, 0, + KCTLX | KCTRL | 'P', mvupwind, MSG_up_window, 0, + KCTLX | KCTRL | 'R', fileread, MSG_file_read, 0, + KCTLX | KCTRL | 'S', filesave, MSG_file_save, 0, + KCTLX | KCTRL | 'V', filevisit, MSG_file_visit, 0, + KCTLX | KCTRL | 'W', filewrite, MSG_file_write, 0, + KCTLX | KCTRL | 'X', swapmark, MSG_swap_dot_and_mark, 0, + KCTLX | KCTRL | 'Z', shrinkwind, MSG_shrink_window, 0, + KCTLX | '=', showcpos, MSG_display_position, 0, + KCTLX | '(', ctlxlp, MSG_start_macro, 0, + KCTLX | ')', ctlxrp, MSG_end_macro, 0, + KCTLX | '?', help, MSG_help, 0, + KCTLX | '0', delwind, MSG_del_window, 0, + KCTLX | '1', onlywind, MSG_only_window, 0, + KCTLX | '2', splitwind, MSG_split_window, 0, + KCTLX | 'B', usebuffer, MSG_use_buffer, 0, + KCTLX | 'C', spawncli, MSG_spawn_cli, 0, /* fitz */ + KCTLX | 'E', ctlxe, MSG_execute_macro, 0, + KCTLX | 'G', gotoline, MSG_goto_line, 0, + KCTLX | 'I', insertunit, MSG_ins_unit, SMOD | SSIZE | SSRCH | SRPLC, + KCTLX | 'K', killbuffer, MSG_kill_buffer, 0, + KCTLX | 'L', load_extend, MSG_load_bindings, 0, + KCTLX | 'N', nextwind, MSG_forw_window, 0, + KCTLX | 'P', prevwind, MSG_back_window, 0, + KCTLX | 'V', viewfile, MSG_view_file, 0, /* jam */ + KCTLX | 'Z', enlargewind, MSG_enlarge_window, 0, + KMETA | KCTRL | 'A', asciimode, MSG_ascii_mode, SSRCH | SRPLC, /* pvr */ + KMETA | KCTRL | 'B', binarymode, MSG_binary_mode, SSRCH | SRPLC, /* pvr */ + KMETA | KCTRL | 'D', decimalmode, MSG_decimal_mode, SSRCH | SRPLC, /* pvr */ + KMETA | KCTRL | 'E', ebcdicmode, MSG_ebcdic_mode, SSRCH | SRPLC, /* pvr */ #if FLOAT_DISP - { KMETA | KCTRL | 'F', floatmode, MSG_float_mode, SSRCH | SRPLC }, /* pvr */ + KMETA | KCTRL | 'F', floatmode, MSG_float_mode, SSRCH | SRPLC, /* pvr */ #endif - { KMETA | KCTRL | 'H', hexmode, MSG_hex_mode, SSRCH | SRPLC }, /* pvr */ - { KMETA | KCTRL | 'K', delbunit, MSG_back_del_unit, SMOD | SSIZE | SSRCH | SRPLC }, - { KMETA | KCTRL | 'N', buffername, MSG_buffer_name, 0 }, - { KMETA | KCTRL | 'O', octalmode, MSG_octal_mode, SSRCH | SRPLC }, /* pvr */ - { KMETA | KCTRL | 'P', n_way_combine, MSG_n_combine, SSIZE | SMOD }, /* pvr */ - { KMETA | KCTRL | 'R', screen_rows, MSG_scr_row, 0 }, /* pvr */ - { KMETA | KCTRL | 'S', n_way_split, MSG_n_split, 0 }, /* pvr */ - { KMETA | KCTRL | 'V', showversion, MSG_display_version, 0 }, - { KMETA | KCTRL | 'W', showsavebuf, MSG_show_save_buf, 0 }, - { KMETA | '1', dispsize1, MSG_unit_size1, SSRCH | SRPLC }, /* pvr */ - { KMETA | '2', dispsize2, MSG_unit_size2, SSRCH | SRPLC }, /* pvr */ - { KMETA | '4', dispsize4, MSG_unit_size4, SSRCH | SRPLC }, /* pvr */ - { KMETA | '8', dispsize8, MSG_unit_size8, SSRCH | SRPLC }, /* pvr */ - { KMETA | '!', reposition, MSG_reposition_window, 0 }, - { KMETA | '.', setmark, MSG_set_mark, 0 }, - { KMETA | '>', gotoeob, MSG_goto_eob, SSRCH | SRPLC }, - { KMETA | '<', gotobob, MSG_goto_bob, SSRCH | SRPLC }, - { KMETA | '+', next_buf, MSG_next_buff, 0 }, - { KMETA | '-', prev_buf, MSG_prev_buff, 0 }, - { KMETA | '%', queryrepl, MSG_query_replace, SMOD }, - { KMETA | '?', wallchart, MSG_display_bindings, 0 }, - { KMETA | 'A', autosave, MSG_auto_save, 0 }, - { KMETA | 'B', backunit, MSG_back_unit, SSRCH | SRPLC }, - { KMETA | 'C', compare, MSG_compare, 0 }, - { KMETA | 'D', delfunit, MSG_forw_del_unit, SMOD | SSIZE | SSRCH | SRPLC }, - { KMETA | 'F', forwunit, MSG_forw_unit, SSRCH | SRPLC }, - { KMETA | 'G', use_buffer, MSG_use_buffer_split, 0 }, - { KMETA | 'K', bindtokey, MSG_bind_to_key, 0 }, - { KMETA | 'L', linkwind, MSG_link_windows, 0 }, - { KMETA | 'O', save_region, MSG_save_region, 0 }, - { KMETA | 'P', print, MSG_print, 0 }, - { KMETA | 'R', backsearch, MSG_back_search, 0 }, - { KMETA | 'S', forwsearch, MSG_forw_search, 0 }, - { KMETA | 'T', searchagain, MSG_search_again, 0 }, - { KMETA | 'U', file_visit, MSG_file_visit_split, 0 }, - { KMETA | 'V', backpage, MSG_back_page, SRPLC }, - { KMETA | 'W', copyregion, MSG_copy_region, 0 }, - { KMETA | 'X', extend, MSG_extended_command, 0 }, - { KMETA | 'Y', yank_buffer, MSG_yank_buffer, SMOD | SSIZE }, - { KMETA | 'Z', mvupwind, MSG_up_window, 0 } + KMETA | KCTRL | 'H', hexmode, MSG_hex_mode, SSRCH | SRPLC, /* pvr */ + KMETA | KCTRL | 'K', delbunit, MSG_back_del_unit, SMOD | SSIZE | SSRCH | SRPLC, + KMETA | KCTRL | 'N', buffername, MSG_buffer_name, 0, + KMETA | KCTRL | 'O', octalmode, MSG_octal_mode, SSRCH | SRPLC, /* pvr */ + KMETA | KCTRL | 'P', n_way_combine, MSG_n_combine, SSIZE | SMOD, /* pvr */ + KMETA | KCTRL | 'R', screen_rows, MSG_scr_row, 0, /* pvr */ + KMETA | KCTRL | 'S', n_way_split, MSG_n_split, 0, /* pvr */ + KMETA | KCTRL | 'V', showversion, MSG_display_version, 0, + KMETA | KCTRL | 'W', showsavebuf, MSG_show_save_buf, 0, + KMETA | '1', dispsize1, MSG_unit_size1, SSRCH | SRPLC, /* pvr */ + KMETA | '2', dispsize2, MSG_unit_size2, SSRCH | SRPLC, /* pvr */ + KMETA | '4', dispsize4, MSG_unit_size4, SSRCH | SRPLC, /* pvr */ + KMETA | '!', reposition, MSG_reposition_window, 0, + KMETA | '.', setmark, MSG_set_mark, 0, + KMETA | '>', gotoeob, MSG_goto_eob, SSRCH | SRPLC, + KMETA | '<', gotobob, MSG_goto_bob, SSRCH | SRPLC, + KMETA | '+', next_buf, MSG_next_buff, 0, + KMETA | '-', prev_buf, MSG_prev_buff, 0, + KMETA | '%', queryrepl, MSG_query_replace, SMOD, + KMETA | '?', wallchart, MSG_display_bindings, 0, + KMETA | 'A', autosave, MSG_auto_save, 0, + KMETA | 'B', backunit, MSG_back_unit, SSRCH | SRPLC, + KMETA | 'C', compare, MSG_compare, 0, + KMETA | 'D', delfunit, MSG_forw_del_unit, SMOD | SSIZE | SSRCH | SRPLC, + KMETA | 'F', forwunit, MSG_forw_unit, SSRCH | SRPLC, + KMETA | 'G', use_buffer, MSG_use_buffer_split, 0, + KMETA | 'K', bindtokey, MSG_bind_to_key, 0, + KMETA | 'L', linkwind, MSG_link_windows, 0, + KMETA | 'O', save_region, MSG_save_region, 0, + KMETA | 'P', print, MSG_print, 0, + KMETA | 'R', backsearch, MSG_back_search, 0, + KMETA | 'S', forwsearch, MSG_forw_search, 0, + KMETA | 'T', searchagain, MSG_search_again, 0, + KMETA | 'U', file_visit, MSG_file_visit_split, 0, + KMETA | 'V', backpage, MSG_back_page, SRPLC, + KMETA | 'W', copyregion, MSG_copy_region, 0, + KMETA | 'X', extend, MSG_extended_command, 0, + KMETA | 'Y', yank_buffer, MSG_yank_buffer, SMOD | SSIZE, + KMETA | 'Z', mvupwind, MSG_up_window, 0 }; #define NKEY (sizeof(key) / sizeof(key[0])) diff -Nru beav-1.40/tcap.c beav-1.40/tcap.c --- beav-1.40/tcap.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/tcap.c 1994-11-30 17:43:35.000000000 +0000 @@ -2,10 +2,7 @@ for beav */ -#include -#include #include "def.h" -#include "prototyp.h" #ifdef UNIX @@ -81,7 +78,7 @@ if ((tgetent (tcbuf, tv_stype)) != 1) { - sprintf (err_str, "Unknown terminal type %s!\n", tv_stype); + sprintf (err_str, "Unknown terminal type %s!\r", tv_stype); puts (err_str); ttclose (); /* fix in 1.13 */ exit (1); @@ -113,7 +110,7 @@ ttclose (); /* fix in 1.13 */ exit (1); } - printf ("nrow %d, ncol %d\r", nrow, ncol); + printf ("nrow %d, ncol %d\n", nrow, ncol); if ((ncol = (short) tgetnum ("co")) == -1) { diff -Nru beav-1.40/termio.c beav-1.40/termio.c --- beav-1.40/termio.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/termio.c 1994-11-30 17:43:35.000000000 +0000 @@ -8,8 +8,6 @@ #ifdef UNIX /* System V */ -#include -#include #include #include #ifdef BSD @@ -28,11 +26,7 @@ #include #define O_NDELAY O_NONBLOCK #else -#ifdef __GLIBC__ -#include -#else -#include -#endif /* __GLIBC__ */ +#include #endif /* MINIX */ #endif /* OS2 */ #endif /* BSD */ @@ -58,20 +52,14 @@ struct sgttyb ntermio; /* charactoristics to use inside */ struct tchars tchars, tcharsorig; #else -#ifdef __GLIBC__ -#include -struct termios otermio; -struct termios ntermio; -#else struct termio otermio; /* original terminal characteristics */ struct termio ntermio; /* charactoristics to use inside */ -#endif /* __GLIBC__ */ #endif /* MINIX */ #endif /* OS2 */ #endif /* BSD */ #ifndef OS2 -//extern errno; /* System error number -- Necessary when compiling in BSD 1.13 */ +extern errno; /* System error number -- Necessary when compiling in BSD 1.13 */ #endif int nrow; /* Terminal size, rows. */ @@ -114,7 +102,7 @@ { nrow = ttysize.ts_lines; ncol = ttysize.ts_cols; -#endif /* ULTRIX */ +#endif } else { @@ -137,23 +125,15 @@ tchars.t_stopc = tchars.t_eofc = tchars.t_brkc = -1; ioctl (0, TIOCSETC, &tchars); #else -#ifdef __GLIBC__ - tcgetattr(0,&otermio); -#else ioctl (0, TCGETA, &otermio);/* save old settings */ - ntermio.c_line = otermio.c_line; -#endif ntermio.c_iflag = 0; /* setup new settings */ ntermio.c_oflag = 0; ntermio.c_cflag = otermio.c_cflag; ntermio.c_lflag = 0; + ntermio.c_line = otermio.c_line; ntermio.c_cc[VMIN] = 1; ntermio.c_cc[VTIME] = 0; -#ifdef __GLIBC__ - tcsetattr(0,TCSANOW,&ntermio); -#else ioctl (0, TCSETAW, &ntermio); /* and activate them */ -#endif #endif /* MINIX */ kbdflgs = fcntl (0, F_GETFL, 0); kbdpoll = FALSE; @@ -186,11 +166,7 @@ ioctl (0, TIOCSETC, &tcharsorig) == -1) printf ("closing ioctl on dev 0 failure, error = %d\n", errno); #else -#ifdef __GLIBC__ - if( tcsetattr(0,TCSANOW,&otermio) == -1) -#else if (ioctl (0, TCSETAW, &otermio) == -1) /* restore terminal settings */ -#endif printf ("closing ioctl on dev 0 failure, error = %d\n", errno); #endif /* MINIX */ if (fcntl (0, F_SETFL, kbdflgs) == -1) @@ -295,7 +271,7 @@ #endif #endif -int ttgetc () +ttgetc () { #ifdef OS2 #ifdef __EMX__ @@ -357,7 +333,7 @@ /* typahead(): Check to see if any characters are already in the keyboard buffer */ -int ttkeyready () +ttkeyready () { #ifdef OS2 #ifdef __EMX__ diff -Nru beav-1.40/text.c beav-1.40/text.c --- beav-1.40/text.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/text.c 1994-11-30 17:43:35.000000000 +0000 @@ -24,14 +24,12 @@ char MSG_05u[] = "%05u"; char MSG_010lu[] = "%010lu"; char MSG_116e[] = "%+1.16e"; -char MSG_106e[] = "%+1.6e"; char MSG_02X[] = "%02X"; char MSG_04X[] = "%04X"; char MSG_08lX[] = "%08lX"; char MSG_siz_8[] = " 8 "; char MSG_siz_16[] = " 16"; char MSG_siz_32[] = " 32"; -char MSG_siz_64[] = " 64"; char MSG_siz_null[] = " "; char MSG_int_shift[] = " S%X"; char MSG_mot_shift[] = " %X"; diff -Nru beav-1.40/tty.c beav-1.40/tty.c --- beav-1.40/tty.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/tty.c 1994-11-30 17:43:35.000000000 +0000 @@ -16,9 +16,6 @@ extern void tcapopen (); extern void tcapclose (); /* DR */ extern void tcapmove (); -extern void tcapeeop (); -extern void tcapeeol (); -extern void tcaprev (); #ifdef MSDOS #include "dos.h" @@ -121,8 +118,8 @@ void tteeol () { -#ifdef MSDOS char col, row, i; +#ifdef MSDOS union REGS regs; if (ibm_pc) diff -Nru beav-1.40/ttykbd.c beav-1.40/ttykbd.c --- beav-1.40/ttykbd.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/ttykbd.c 1994-11-30 17:43:35.000000000 +0000 @@ -67,7 +67,6 @@ extern char MSG_unit_size1[]; extern char MSG_unit_size2[]; extern char MSG_unit_size4[]; -extern char MSG_unit_size8[]; extern char MSG_reposition_window[]; extern char MSG_set_mark[]; extern char MSG_goto_eob[]; diff -Nru beav-1.40/window.c beav-1.40/window.c --- beav-1.40/window.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/window.c 1994-11-30 17:43:35.000000000 +0000 @@ -1,7 +1,6 @@ /* * Window handling. */ -#include #include "def.h" bool mvupwind (); @@ -289,9 +288,9 @@ register WINDOW *wp; register int ntru; register int ntrl; - //register int ntrd; - //register WINDOW *wp1; - //register WINDOW *wp2; + register int ntrd; + register WINDOW *wp1; + register WINDOW *wp2; char buf[NCOL], buf1[NCOL]; if (curwp->w_ntrows < MIN_WIN_ROWS) diff -Nru beav-1.40/word.c beav-1.40/word.c --- beav-1.40/word.c 2022-11-24 17:51:27.000000000 +0000 +++ beav-1.40/word.c 1994-11-30 17:43:35.000000000 +0000 @@ -23,7 +23,7 @@ backunit (f, n, k) int f, n, k; { - char ret = 0; + char ret; if (n < 0) return (forwunit (f, -n, KRANDOM));