Merge pull request #30 from ibara/master

Changes for emg 1.6 merged.
This commit is contained in:
Serge Vakulenko
2014-05-30 21:01:53 -07:00
18 changed files with 73 additions and 37 deletions

View File

@@ -77,7 +77,7 @@ INC_FILES = $(wildcard include/*.h) \
$(wildcard include/smallc/*.h) \
$(wildcard include/smallc/sys/*.h) \
$(wildcard include/arpa/*.h)
SHARE_FILES = share/re.help share/example/Makefile \
SHARE_FILES = share/re.help share/emg.keys share/example/Makefile \
share/example/ashello.S share/example/chello.c \
share/example/blkjack.bas share/example/hilow.bas \
share/example/stars.bas share/example/prime.scm \
@@ -179,6 +179,7 @@ cleanall: clean
rm -f games/lib/adventure.dat
rm -f games/lib/cfscores
rm -f share/re.help
rm -f share/emg.keys
rm -f share/misc/more.help
rm -f etc/termcap etc/remote etc/phones
rm -rf share/unixbench

View File

@@ -1,6 +1,11 @@
ChangeLog
=========
May 29, 2014 : emg 1.6
----------------------
emg is now part of the RetroBSD tree.
Add PgUp and PgDn scrolling.
March 16, 2014 : emg 1.5
------------------------
Add line number to the mode line.

View File

@@ -34,11 +34,8 @@ appreciate the history of this software.
As both Ersatz Emacs and Mg are Public Domain, emg is also Public Domain.
Versions of emg up to and including 1.2 also supported OpenBSD; OpenBSD
has since dropped the older headers, such as sgtty.h and it is not worth
reimplementing these for OpenBSD, since OpenBSD maintains Mg.
has since dropped the older headers, such as sgtty.h, and it is not worth
reimplementing these for OpenBSD since OpenBSD maintains Mg.
Tarballs can be found here:
http://devio.us/~bcallah/emg/
Github repo, for patches:
https://github.com/ibara/emg
====================================
Brian Callahan <bcallah@openbsd.org>

View File

@@ -21,6 +21,8 @@ int forwchar(int f, int n);
int backchar(int f, int n);
int forwline(int f, int n);
int backline(int f, int n);
int pagedown(int f, int n);
int pageup(int f, int n);
/*
* This routine, given a pointer to a LINE, and the current cursor goal
@@ -252,6 +254,28 @@ int backline(int f, int n)
return (TRUE);
}
/*
* PgDn. Scroll down (FORCE_ROWS - 1).
* Just forwline(f, (FORCE_ROWS -1))
* Bound to C-V
*/
int pagedown(int f, int n)
{
forwline(f, (FORCE_ROWS - 1));
return (TRUE);
}
/*
* PgUp. Scroll up (FORCE_ROWS - 1).
* Just backline(f, (FORCE_ROWS -1))
* Bound to M-V
*/
int pageup(int f, int n)
{
backline(f, (FORCE_ROWS - 1));
return (TRUE);
}
/*
* Set the mark in the current window to the value of "." in the window. No
* errors are possible. Bound to "M-.".

View File

@@ -647,7 +647,7 @@ void modeline(WINDOW *wp)
n = 2;
/* This is the version string. Do not forget to
* increment when releasing a new version. */
n += vtputs(" emg 1.5 ");
n += vtputs(" emg 1.6 ");
vtputc(lchar);
vtputc(lchar);
@@ -676,7 +676,7 @@ void modeline(WINDOW *wp)
}
len = snprintf(sl, sizeof(sl), " %d%% (%d,%d) ",
((wp->w_dotline +1) / bp->b_lines),
((100*(wp->w_dotline)) / bp->b_lines),
(wp->w_dotline + 1), getccol(FALSE));
if (len < sizeof(sl) && len != -1)
n += vtputs(sl);

View File

@@ -26,6 +26,7 @@ KEYTAB keytab[] = {
{CTRL | 'R', backsearch},
{CTRL | 'S', forwsearch},
{CTRL | 'T', twiddle},
{CTRL | 'V', pagedown},
{CTRL | 'W', killregion},
{CTRL | 'Y', yank},
{CTLX | '(', ctlxlp},
@@ -63,6 +64,7 @@ KEYTAB keytab[] = {
{META | 'R', sreplace},
{META | 'S', forwsearch}, /* non-standard */
{META | 'U', upperword},
{META | 'V', pageup},
{META | 'W', copyregion},
{META | 'Z', quickexit},
{META | 0x7F, delbword},

View File

@@ -23,6 +23,8 @@ extern int gotoeol(); /* Move to end of line */
extern int backchar(); /* Move backward by characters */
extern int forwline(); /* Move forward by lines */
extern int backline(); /* Move backward by lines */
extern int pagedown(); /* PgDn */
extern int pageup(); /* PgUp */
extern int gotobob(); /* Move to start of buffer */
extern int gotoeob(); /* Move to end of buffer */
extern int setfillcol(); /* Set fill column */

View File

@@ -1,4 +1,4 @@
emg keybindings (March 16, 2014)
emg keybindings (May 29, 2014)
Based on Ersatz Emacs (2000/09/14)
M- means to use the <ESC> key prior to using another key
@@ -13,6 +13,7 @@ M- means to use the <ESC> key prior to using another key
^P Previous line M-N End of paragraph
^A Front of line M-< or [HOME] Start of file
^E End of line M-> or [END] End of file
^V or [PgDn] Scroll down M-V or [PgUp] Scroll up
M-G Go to line Arrow keys are active
------------------------------------------------------------------------------

View File

@@ -458,6 +458,10 @@ int extendedcmd(int f, int n)
case 'D': cmd = backchar; break;
case 'H': cmd = gotobob; break;
case 'W': cmd = gotoeob; break;
case '5': cmd = pageup; getctl(); break;
case '6': cmd = pagedown; getctl(); break;
case '7': cmd = gotobob; getctl(); break;
case '8': cmd = gotoeob; getctl(); break;
default: mlwrite("\007[Key not bound]");
return (FALSE);
}

View File

@@ -1,10 +1,10 @@
all:
make -C retro
make -C linux
${MAKE} -C retro
${MAKE} -C linux
install:
make -C retro install
${MAKE} -C retro install
clean:
make -C retro clean
make -C linux clean
${MAKE} -C retro clean
${MAKE} -C linux clean

View File

@@ -68,18 +68,18 @@ acutab.o: acutab.c
log.o remote.o: Makefile
aculib: FRC
cd aculib; make ${MFLAGS}
cd aculib; ${MAKE} ${MFLAGS}
clean: FRC
rm -f ${OBJS} core tip tip.elf tip.dis
cd aculib; make ${MFLAGS} clean
cd aculib; ${MAKE} ${MFLAGS} clean
depend: FRC
mkdep ${CFLAGS} ${SRCS}
cd aculib; make ${MFLAGS} depend
cd aculib; ${MAKE} ${MFLAGS} depend
install: aculib tip
cd aculib; make ${MFLAGS} install
cd aculib; ${MAKE} ${MFLAGS} install
cp tip ${DESTDIR}/bin/tip
rm -f ${DESTDIR}/bin/cu
touch ${DESTDIR}/${ADM}/aculog

View File

@@ -44,7 +44,7 @@ SUBDIRS=C. D.${HOSTNAME}X D.${HOSTNAME} D. X. TM.
all: libacu $(ALL)
libacu:
cd aculib && make
cd aculib && ${MAKE}
uuencode: uuencode.o
@@ -136,7 +136,7 @@ install: uuencode uuencode
clean:
rm -f *.o $(ALL) libuucp.a *.dis *.elf
cd aculib; make ${MFLAGS} clean
cd aculib; ${MAKE} ${MFLAGS} clean
depend:
mkdep ${CFLAGS} *.c

View File

@@ -42,7 +42,7 @@ FRC:
install: $(STD) $(NSTD)
-for i in $(SUBDIR); do \
make -C $$i $(MFLAGS) DESTDIR=$(DESTDIR) install; done
${MAKE} -C $$i $(MFLAGS) DESTDIR=$(DESTDIR) install; done
-for i in $(STD) $(NSTD); do \
install $$i $(DESTDIR)/games/$$i; done
-for i in *.6; do \
@@ -52,7 +52,7 @@ install: $(STD) $(NSTD)
clean:
rm -f a.out core *.s *.o *.dis *.elf $(STD) $(NSTD)
-for i in $(SUBDIR); do make -C $$i $(MFLAGS) clean; done
-for i in $(SUBDIR); do ${MAKE} -C $$i $(MFLAGS) clean; done
# Files listed in $(NSTD) have explicit make lines given below.

View File

@@ -40,7 +40,7 @@ all: ../libc.a
rm -rf tmp
${ALL}: FRC
cd $@; make ${MFLAGS} DEFS="${DEFS}"
cd $@; ${MAKE} ${MFLAGS} DEFS="${DEFS}"
FRC:
@@ -51,9 +51,9 @@ install: ../libc.a
clean:
for i in ${ALL}; \
do (cd $$i; make ${MFLAGS} clean); done
do (cd $$i; ${MAKE} ${MFLAGS} clean); done
rm -rf tmp *.a *~
depend:
for i in ${ALL}; \
do (cd $$i; make ${MFLAGS} DEFS="${DEFS}" depend); done
do (cd $$i; ${MAKE} ${MFLAGS} DEFS="${DEFS}" depend); done

View File

@@ -17,19 +17,19 @@ mips.a: ${ALL}
rm -rf tmp
${ALL}: FRC
cd $@; make ${MFLAGS} DEFS=${DEFS}
cd $@; ${MAKE} ${MFLAGS} DEFS=${DEFS}
FRC:
tags:
for i in ${ALL}; do \
(cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \
(cd $$i; ${MAKE} ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \
done
clean:
for i in ${ALL}; do (cd $$i; make ${MFLAGS} clean); done
for i in ${ALL}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done
rm -rf *.a tmp *~
depend:
for i in ${ALL}; do \
(cd $$i; make ${MFLAGS} DEFS=${DEFS} depend); done
(cd $$i; ${MAKE} ${MFLAGS} DEFS=${DEFS} depend); done

View File

@@ -26,7 +26,7 @@ all: ../libtermcap.a termcap
.PHONY: termcap
termcap:
cd termcap && make
cd termcap && ${MAKE}
../libtermcap.a: ${OBJS}
$(AR) cr ../libtermcap.a ${OBJS}

View File

@@ -11,14 +11,14 @@ SUBDIR = misc
all: ${SUBDIR}
${SUBDIR}: FRC
cd $@; make ${MFLAGS}
cd $@; ${MAKE} ${MFLAGS}
FRC:
install: FRC
-for i in ${SUBDIR}; do \
(cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done
(cd $$i; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install); done
clean:
rm -f *~
for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
for i in ${SUBDIR}; do (cd $$i; ${MAKE} ${MFLAGS} clean); done

View File

@@ -10,12 +10,12 @@ SUBDIR = baremetal dip duinomite duinomite-uart duinomite-e \
default:
all:
-for i in $(SUBDIR); do make -C $$i all; done
-for i in $(SUBDIR); do ${MAKE} -C $$i all; done
install:
clean:
-for i in $(SUBDIR); do make -C $$i clean; done
-for i in $(SUBDIR); do ${MAKE} -C $$i clean; done
find .. -name \*~ | xargs rm -f
reconfig: