Commit 4aab39ab authored by Dmitry Bogatov's avatar Dmitry Bogatov

Import Upstream version e3-2.30

parents
This diff is collapsed.
e3 is not public domain software --- it is copyrighted. However, it may be used
for any purpose without royalty or fees in accordance with the terms of the
copyright.
-----------------------------------------------------------------------------
Copyright (c) 2000,01,02 Albrecht Kleine
All rights reserved.
You may distribute under the terms of the GNU General Public License.
See COPYING.GPL for more details.
IN NO EVENT SHALL ALBRECHT KLEINE BE LIABLE TO ANY PARTY FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ALBRECHT KLEINE
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ALBRECHT KLEINE SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS"
BASIS, AND ALBRECHT KLEINE HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-----------------------------------------------------------------------------
This diff is collapsed.
# 1. edit you OS if you want....
OS=LINUX
#OS=BEOS
#OS=FREEBSD
#OS=QNX
#OS=ATHEOS
#OS=W32 ** please use a separate make.bat for W9x **
# Set this to gzexe or upx if you want compression
COMPRESS=gzexe
# 2. edit dest dir prefix if you want....
PREFIX='/usr/local'
#PREFIX=/boot/home
# 3. for vi friends only (else leave as is):
# choice between '/bin/ex' or default '/bin/sed'
EXMODE=SED
#EXMODE=EX
BINDIR='$(PREFIX)/bin'
MANSEC='1'
MANDIR='$(PREFIX)/man/man$(MANSEC)'
#______________________do not edit below line________________________
ASOURCES=e3.asm e3.h
AFLAGS = -w+orphan-labels -f elf
# this fixes a nasty NASM version conflict
# NASM 0.98.08 claims to use -O2 by default, but does not.
# NASM 0.98 does not know the -O2 switch
#
ASVER := $(shell nasm -r)
ifeq ($(ASVER),NASM version 0.98)
NASM=nasm
else
NASM=nasm -O2
endif
all: e3
e3: $(ASOURCES) Makefile
ifeq ($(OS),LINUX)
echo $(ASVER)
$(NASM) -f bin -l e3.lst -o e3 e3.asm -DCRIPLED_ELF=1 -D$(OS) -D$(EXMODE)
chmod +x e3
ifeq ($(COMPRESS),upx)
if which upx > /dev/null 2>&1 ; then \
upx -q -q -q -k -9 e3 ; \
fi ;
endif
ifeq ($(COMPRESS),gzexe)
if which gzexe > /dev/null 2>&1 ; then gzexe e3; fi;
endif
else
echo $(ASVER)
$(NASM) $(AFLAGS) -o e3.o e3.asm -l e3.lst -D$(OS) -D$(EXMODE)
ifeq ($(OS),QNX)
ld -s -o e3 e3.o -lc
else
ld -s -o e3 e3.o
endif
strip --remove-section .comment e3
endif
ln -sf e3 e3ws
ln -sf e3 e3em
ln -sf e3 e3pi
ln -sf e3 e3vi
ln -sf e3 e3ne
# next three are for testing purpose: linking w libc
statc:
$(NASM) $(AFLAGS) -o e3.o e3.asm -l e3.lst -DLINUX -DLIBC -D$(EXMODE)
ld -s -static -o e3statc e3.o -lc
dync:
$(NASM) $(AFLAGS) -o e3.o e3.asm -l e3.lst -DLINUX -DLIBC -DDYN -D$(EXMODE)
gcc e3.o -o e3dync
# strip e3dync
dync2:
$(NASM) $(AFLAGS) -o e3.o e3.asm -l e3.lst -DLINUX -DLIBC -DDYN -D$(EXMODE)
ld -s -m elf_i386 -o e3dync2 e3.o \
-lc -dynamic-linker /lib/ld-linux.so.2 \
/usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtn.o
# next for running in gnu debugger
debug: $(ASOURCES) Makefile
$(NASM) $(AFLAGS) -g -o e3.o e3.asm -l e3.lst -D$(OS) -D$(EXMODE)
ld -s -o e3 e3.o
strip --remove-section .comment e3
ln -sf e3 e3ws
ln -sf e3 e3em
ln -sf e3 e3pi
ln -sf e3 e3vi
ln -sf e3 e3ne
# selftest, linux only, assembled with a special option for using an input pipe
test:
ifeq ($(OS),LINUX)
$(NASM) -f bin -l e3.lst -o e3test e3.asm -DSELFTEST -DCRIPLED_ELF=1 -DLINUX -D$(EXMODE)
ifeq ($(COMPRESS),upx)
if which upx > /dev/null 2>&1 ; then \
upx -q -q -q -k -9 e3test ; \
fi ;
endif
ifeq ($(COMPRESS),gzexe)
if which gzexe > /dev/null 2>&1 ; then gzexe e3test; fi;
endif
if [ -f PIPE_IN ]; then rm PIPE_IN ; fi
if [ -f e3test~ ]; then rm e3test~ ; fi
chmod +x e3test
cat e3.h tests/e3test0 | ./e3test
clear
diff e3.h PIPE_IN && echo -e "\n\n\n**** THE TEST WAS SUCCESSFUL ****\n\n\n"
rm PIPE_IN e3test
endif
# next for cross asm for the ELKS people
elks:
nasm -w+orphan-labels -f as86 -o e3-16.o e3-16.asm -l e3-16.lst -D AS86 -D ELKS
ld86 -0 -s -i -H 0xF800 -o e3-16 e3-16.o
# next two for cross asm testing
w32lst:
$(NASM) -f coff -o e3.oW32 e3.asm -l e3.lstW32 -DW32
rm e3.oW32
qnxlst:
$(NASM) -f elf -o e3.oQNX e3.asm -l e3.lstQNX -DQNX
rm e3.oQNX
# next for release maintainance
man2html:
rman -f HTML e3.man >e3.html
install: e3
ifeq ($(OS),QNX)
cp ./e3 $(BINDIR)/e3
ln -sf $(BINDIR)/e3 $(BINDIR)/e3ws
ln -sf $(BINDIR)/e3 $(BINDIR)/e3em
ln -sf $(BINDIR)/e3 $(BINDIR)/e3pi
ln -sf $(BINDIR)/e3 $(BINDIR)/e3vi
ln -sf $(BINDIR)/e3 $(BINDIR)/e3ne
else
install -d $(PREFIX) $(BINDIR) $(MANDIR)
install -m 755 e3 $(BINDIR)
ln -sf $(BINDIR)/e3 $(BINDIR)/e3ws
ln -sf $(BINDIR)/e3 $(BINDIR)/e3em
ln -sf $(BINDIR)/e3 $(BINDIR)/e3pi
ln -sf $(BINDIR)/e3 $(BINDIR)/e3vi
ln -sf $(BINDIR)/e3 $(BINDIR)/e3ne
install -m 644 e3.man $(MANDIR)/e3.$(MANSEC)
endif
clean:
rm -f e3*.o e3*.lst e3 e3em e3pi e3vi e3ws e3ne *~ \
PIPE_IN e3test~ e3test e3dync e3dync2 e3statc
This diff is collapsed.
Keyboard problems:
* Home, End are not sending ESC sequences, but ASCII chars ^A,^F,
(maybe good for Emacs mode, but bad for WStar)
* using a German kbd map ^Z is at Ctrl+Y and NOT at Ctrl+Z,
I consider that as atheos bugs, not e3's bugs.
\ No newline at end of file
#!/bin/sh
clear
cat <<MSG
Dear e3/Atheos user,
due less of feedback e3/Atheos binaries are no more shipped.
Please build it yourself by running make. Sorry for inconvenience.
Albrecht Kleine
Sat Mar 16 17:06:04 MET 2002
MSG
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
#!/bin/sh
clear
cat <<MSG
Dear e3/BeOS user,
due less of feedback e3/BeOS binaries are no more shipped.
Please build it yourself by running make. Sorry for inconvenience.
Albrecht Kleine
Sat Mar 16 17:06:04 MET 2002
MSG
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
File added
File added
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
File added
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
# Makefile for NetBSD
# (does not use GNU make extensions)
#
# On NetBSD we use some kind of Linux emulation mode
# (so you can use Linux settings completely)
# See some output from ktrace:
# 382 ktrace EMUL "netbsd"
# 382 ktrace RET ktrace 0
# 382 ktrace CALL execve(0xbfbfdd77,0xbfbfdd00,0xbfbfdd0c)
# 382 ktrace NAMI "./e3"
# 382 e3 EMUL "linux"
# .........
#
# 1. edit you OS if you want....
OS=LINUX # okay for NetBSD
#OS=BEOS
#OS=FREEBSD
#OS=QNX
#OS=W32 ** please use a separate make.bat for W9x **
# 2. edit dest dir prefix if you want....
PREFIX='/usr/local'
# 3. for vi friends only (else leave as is):
# choice between '/bin/ex' or default '/bin/sed'
EXMODE=SED
#EXMODE=EX
BINDIR='$(PREFIX)/bin'
MANSEC='1'
MANDIR='$(PREFIX)/man/man$(MANSEC)'
#______________________do not edit below line________________________
ASOURCES=e3.asm
AFLAGS = -w+orphan-labels -f elf
all: $(ASOURCES) Makefile
nasm $(AFLAGS) -o e3.o $(ASOURCES) -l e3.lst -D$(OS) -D$(EXMODE)
ld -s -o e3 e3.o
strip --remove-section .comment e3
ln -sf e3 e3ws
ln -sf e3 e3em
ln -sf e3 e3pi
ln -sf e3 e3vi
ln -sf e3 e3ne
install: e3
install -d $(PREFIX) $(BINDIR) $(MANDIR)
install -m 755 e3 $(BINDIR)
ln -sf $(BINDIR)/e3 $(BINDIR)/e3ws
ln -sf $(BINDIR)/e3 $(BINDIR)/e3em
ln -sf $(BINDIR)/e3 $(BINDIR)/e3pi
ln -sf $(BINDIR)/e3 $(BINDIR)/e3vi
ln -sf $(BINDIR)/e3 $(BINDIR)/e3ne
install -m 644 e3.man $(MANDIR)/e3.$(MANSEC)
clean:
rm -f e3*.o e3*.lst e3 e3em e3pi e3vi e3ws e3ne
This release does NOT carry binaries for
NetBSD and OpenBSD. Please build your own
using the included Makefiles. You don't
need GNU-make, so BSD-make will do the job.
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
# Makefile for OpenBSD
# (does not use GNU make extensions)
#
# 1. edit you OS if you want....
#OS=LINUX
#OS=BEOS
OS=FREEBSD # okay for OpenBSD
#OS=QNX
#OS=W32 ** please use a separate make.bat for W9x **
# 2. edit dest dir prefix if you want....
PREFIX='/usr/local'
# 3. for vi friends only (else leave as is):
# choice between '/bin/ex' or default '/bin/sed'
EXMODE=SED
#EXMODE=EX
BINDIR='$(PREFIX)/bin'
MANSEC='1'
MANDIR='$(PREFIX)/man/man$(MANSEC)'
#______________________do not edit below line________________________
ASOURCES=e3.asm
AFLAGS = -w+orphan-labels -f elf
all: $(ASOURCES) Makefile
nasm $(AFLAGS) -o e3.o $(ASOURCES) -l e3.lst -D$(OS) -D$(EXMODE)
ld -s -o e3 e3.o
strip --remove-section .comment e3
ln -sf e3 e3ws
ln -sf e3 e3em
ln -sf e3 e3pi
ln -sf e3 e3vi
ln -sf e3 e3ne
install: e3
install -d $(PREFIX) $(BINDIR) $(MANDIR)
install -m 755 e3 $(BINDIR)
ln -sf $(BINDIR)/e3 $(BINDIR)/e3ws
ln -sf $(BINDIR)/e3 $(BINDIR)/e3em
ln -sf $(BINDIR)/e3 $(BINDIR)/e3pi
ln -sf $(BINDIR)/e3 $(BINDIR)/e3vi
ln -sf $(BINDIR)/e3 $(BINDIR)/e3ne
install -m 644 e3.man $(MANDIR)/e3.$(MANSEC)
clean:
rm -f e3*.o e3*.lst e3 e3em e3pi e3vi e3ws e3ne
This release does NOT carry binaries for
NetBSD and OpenBSD. Please build your own
using the included Makefiles. You don't
need GNU-make, so BSD-make will do the job.
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
#!/bin/sh
clear
cat <<MSG
Dear e3/QNX user,
due less of feedback e3/QNX binaries are no more shipped.
Please build it yourself by running make. Sorry for inconvenience.
Albrecht Kleine
Sat Mar 16 17:06:04 MET 2002
MSG
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
e3
\ No newline at end of file
@ren e3.exe e3em.exe >NUL
@e3em.exe
@ren e3em.exe e3.exe
@ren e3.exe e3ne.exe >NUL
@e3ne.exe
@ren e3ne.exe e3.exe
@ren e3.exe e3pi.exe >NUL
@e3pi.exe
@ren e3pi.exe e3.exe
@ren e3.exe e3vi.exe >NUL
@e3vi.exe
@ren e3vi.exe e3.exe
@ren e3.exe e3ws.exe >NUL
@e3ws.exe
@ren e3ws.exe e3.exe
If you have problems running one of the primary self compressors
"gzexe" or "upx" you should give a try to the combination of
tinlink linker and 624 selfcompressor utility tools.
Both are easy to find on the net (via freshmeat.net),
but available only for Linux.
Here's how that e3 can be built:
------------------------------------------------
#!/bin/sh
nasm -f bin -o e3 e3.asm -DLINUX -DSED -DTINLINK
./tinlink -c e3 -m 10000000 -o e3.tin
./624 -s e3.tin e3
chmod +x e3
------------------------------------------------
%define Name e3
%define Version 2.3
%define Prefix /usr/local
Name: e3
Version: 2.3
Release: 1
Group: System/Utilities
Summary: e3 is tiny wordstar/emacs/pico/vi/nedit alike editor, well suited for rescue disks.
Copyright: GPL
Packager : Urs Rau <urs.rau@uk.om.org>
#Conflicts:
#Buildroot: /tmp/%{Name}-%{Version}
Provides: editor e3 e3-2.3
Source: %{Name}-%{Version}.tar.gz
%Description
e3 is teeny tiny editor that doesn't depend on any libs.
e3 uses subset of wordstar|emacs|pico|vi|nedit commands.
Author: Albrecht Kleine <kleine@ak.sax.de>
%Prep
%setup -q -n %{Name}-%{Version}
%Build
make
%Install
rm -rf $RPM_BUILD_ROOT
make PREFIX="$RPM_BUILD_ROOT/usr/local" install
%Clean
rm -rf $RPM_BUILD_ROOT
%Files
%defattr(-,root,root)
%{Prefix}/bin/e3
%{Prefix}/man/man1/e3.1
#!/bin/sh
# (c) 2000 GPL David Douthitt <ddouthitt@mennonite.minister.net>
# a wrapper for editing a sequence of files.....
# ....define your favourite edit mode in E3EMU (or use default)
# Thanks to David! -- Sat Nov 11 2000 a.k.
E3_DEFAULT=e3vi # hey, I LIKE vi, alright? :-)
case $E3EMU in
ws|wordstar) E3=e3ws ;;
vi) E3=e3vi ;;
em|emacs) E3=e3em ;;
pi|pico) E3=e3pi ;;
"") E3=$E3_DEFAULT ;;
*) echo "e3: improper emulation! ($E3EMU)"; exit 1;;
esac
for file in "$@"; do
$E3 $file
done
#!/bin/bash
#
# Date: Wed, 16 May 2001 15:11:08 +0200
#
# I made this script from the original ewrapper.sh for a linux-on-a-floppy
# project i'm playing with.
# The main difference to the original is that you don't have all this e3xx
# links laying around and that you can call things with their real names
# (that's user friendly).
# "pico" is a demo for any other filename below. Copy to "emacs" etc. if you want,
# or create some links to this script.
# (c) 2001 Tito <farmatito@tiscalinet.it>
#
#
E3_PATH=/usr/local/bin
case $0 in
*ws|*wordstar)
E3=e3ws
;;
*vi)
E3=e3vi
;;
*em|*emacs)
E3=e3em
;;
*pi|*pico)
E3=e3pi
;;
*ne|*nedit)
E3=e3ne
;;
*)
echo "e3: improper emulation! ($0).Use emacs,wordstar,vi,pico,nedit"
;;
esac
if [ $@ = ] 2>/dev/null
then
ln -s $E3_PATH/e3 $E3_PATH/$E3
$E3_PATH/$E3
rm -f $E3_PATH/$E3
else
for file in $@
do
ln -s $E3_PATH/e3 $E3_PATH/$E3
$E3_PATH/$E3 $file
rm -f $E3_PATH/$E3
done
fi
../e3-16.asm
\ No newline at end of file
../e3.asm
\ No newline at end of file
../e3.h
\ No newline at end of file
@rem 16 bit DOS .COM version
NASMW -DCOM e3-16.asm -l e3com16.lst -o e3-16.com -f bin
@rem
@rem 16 bit DOS .EXE version
NASMW -DEXE e3-16.asm -l e3exe16.lst -o e3-16e.exe -f bin
@rem
@rem 16 bit DOS EXE-STUB version for e3.exe
NASMW -DEXESTUB e3-16.asm -l e3stub.lst -o e3stub.obj -f obj
ALINK e3stub.obj
@rem
@rem 32 bit e3.exe itself
NASMW -DW32 e3.asm -l e3.lst -f win32
@rem
@rem link all togehther
ALINK -oPE -subsys console e3 win32.lib -entry _start -stub e3stub.exe
@rem
@rem install into path
copy e3.exe C:\windows\e3.exe
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!-- manual page source format generated by PolyglotMan v3.0.9, -->
<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
<HTML>
<HEAD>
<TITLE>E3(1) manual page</TITLE>
</HEAD>
<BODY bgcolor=white>
<A HREF="#toc">Table of Contents</A><P>
<P>
<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
E3 - A mini text editor <P>
<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
<B>e3[ws|em|pi|vi|ne]</B> [filename] <P>
<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
<P>
<I>e3</I>
is a complete mini application written fully in assembler, with a code
size less than 10000 byte. There is a status &amp; input line, where you can
enter filenames, blocknames, find-texts and line numbers. The editor commands
are similary the families of <I>Wordstar</I>-like or <I>Emacs</I> or <I>Pico</I> or <I>vi</I> or <I>Nedit</I>
editors. For online help press ESC:h in vi mode, else Alt-H. This man page
describes Wordstar key bindings only. <P>
<H2><A NAME="sect3" HREF="#toc3">Keyboard Commands for Ws</A></H2>
<P>
<DL>
<DT><B>^A </B></DT>
<DD>Go word
left </DD>
<DT><B>^C </B></DT>
<DD>Go page down </DD>
<DT><B>^D </B></DT>
<DD>Go right </DD>
<DT><B>^E </B></DT>
<DD>Go up </DD>
<DT><B>^F </B></DT>
<DD>Go word right </DD>
<DT><B>^G </B></DT>
<DD>Delete current
character </DD>
<DT><B>^H </B></DT>
<DD>Delete left character </DD>
<DT><B>^I </B></DT>
<DD>Tabulator </DD>
<DT><B>^J </B></DT>
<DD>Get online help </DD>
<DT><B>^KB </B></DT>
<DD>Set
block start marker </DD>
<DT><B>^KC </B></DT>
<DD>Copy current block </DD>
<DT><B>^KD </B></DT>
<DD>Save file and load a new one
</DD>