diff options
author | Pawel Wiecek <coven@debian.org> | 2006-03-29 23:32:05 +0200 |
---|---|---|
committer | Dmitry Bogatov <KAction@debian.org> | 2019-01-13 16:51:08 +0000 |
commit | ad22f42ef0f1e7e9ebf65fefb032a6b91f547b70 (patch) | |
tree | 749da6e1ebf4e93a41333e0fbcdd0d383d2d4505 | |
parent | f2bd06517deca6f527fc9ff7a1a64daf90cfa6bc (diff) | |
parent | 03f29eed981f59d29a619bd61437add5e9436a8a (diff) |
Import Debian changes 1:2.70-1
e3 (1:2.70-1) unstable; urgency=low
* New upstream version
* Updated to current debhelper
-rw-r--r-- | COPYRIGHT | 2 | ||||
-rw-r--r-- | ChangeLog | 123 | ||||
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | README | 134 | ||||
-rw-r--r-- | README.UTF8 | 54 | ||||
-rw-r--r-- | armlinux/e3.s | 376 | ||||
-rw-r--r-- | bin/ARM_Linux/README | 6 | ||||
-rwxr-xr-x | bin/ARM_Linux/e3 | bin | 35716 -> 34660 bytes | |||
-rw-r--r-- | bin/ARM_Linux/e3_2.6.1_arm.ipk | bin | 12629 -> 0 bytes | |||
-rw-r--r-- | bin/ARM_Linux/e3_2.7.0_arm.ipk | bin | 0 -> 12525 bytes | |||
-rw-r--r-- | bin/Atheos/BUGS | 8 | ||||
-rwxr-xr-x | bin/Atheos/e3 | 11 | ||||
l--------- | bin/Atheos/e3em | 1 | ||||
l--------- | bin/Atheos/e3ne | 1 | ||||
l--------- | bin/Atheos/e3pi | 1 | ||||
l--------- | bin/Atheos/e3vi | 1 | ||||
l--------- | bin/Atheos/e3ws | 1 | ||||
-rwxr-xr-x | bin/BeOS/e3 | 11 | ||||
l--------- | bin/BeOS/e3em | 1 | ||||
l--------- | bin/BeOS/e3ne | 1 | ||||
l--------- | bin/BeOS/e3pi | 1 | ||||
l--------- | bin/BeOS/e3vi | 1 | ||||
l--------- | bin/BeOS/e3ws | 1 | ||||
-rw-r--r-- | bin/DOS/README | 8 | ||||
-rwxr-xr-x | bin/DOS/e3-16.com | bin | 0 -> 3913 bytes | |||
-rwxr-xr-x | bin/ELKS/e3-16 | bin | 4448 -> 4448 bytes | |||
-rwxr-xr-x | bin/FreeBSD/e3 | bin | 12984 -> 13012 bytes | |||
-rw-r--r-- | bin/Linux/README | 3 | ||||
-rwxr-xr-x | bin/Linux/e3 | bin | 13105 -> 13310 bytes | |||
-rwxr-xr-x | bin/Linux/e3_noUTF8 | bin | 12938 -> 12940 bytes | |||
-rwxr-xr-x | bin/Linux/e3_yasm | bin | 16616 -> 0 bytes | |||
-rwxr-xr-x | bin/Linux_x86-64/e3-64 | bin | 0 -> 21032 bytes | |||
-rwxr-xr-x | bin/Linux_x86-64/e3_64 | bin | 16664 -> 0 bytes | |||
-rw-r--r-- | bin/NetBSD/Makefile | 70 | ||||
-rw-r--r-- | bin/NetBSD/README | 4 | ||||
-rwxr-xr-x | bin/NetBSD/e3 | bin | 226 -> 13000 bytes | |||
-rw-r--r-- | bin/OpenBSD/README | 2 | ||||
-rwxr-xr-x | bin/OpenBSD/e3 | bin | 0 -> 16788 bytes | |||
-rwxr-xr-x | bin/QNX/e3 | 11 | ||||
l--------- | bin/QNX/e3em | 1 | ||||
l--------- | bin/QNX/e3ne | 1 | ||||
l--------- | bin/QNX/e3pi | 1 | ||||
l--------- | bin/QNX/e3vi | 1 | ||||
l--------- | bin/QNX/e3ws | 1 | ||||
-rwxr-xr-x | bin/Win9x/e3.exe | bin | 19464 -> 19464 bytes | |||
-rw-r--r-- | contrib/README.tinlink624 | 16 | ||||
-rwxr-xr-x | contrib/ewrapper.sh | 21 | ||||
-rwxr-xr-x | contrib/pico | 60 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | debian/rules | 2 | ||||
l--------- | doswin9x/e3-16.asm | 1 | ||||
l--------- | doswin9x/e3.asm | 1 | ||||
l--------- | doswin9x/e3.h | 1 | ||||
-rw-r--r-- | doswin9x/make.bat | 18 | ||||
-rw-r--r-- | e3-16.asm | 4 | ||||
-rw-r--r-- | e3.asm | 366 | ||||
-rw-r--r-- | e3.h | 123 | ||||
-rw-r--r-- | e3.spec (renamed from contrib/e3.spec) | 6 | ||||
-rw-r--r-- | e3c/Makefile.mipsel | 42 | ||||
-rw-r--r-- | e3c/README | 8 | ||||
-rw-r--r-- | e3c/e3.c | 27 | ||||
-rw-r--r-- | tests/e3test0 | 4 |
63 files changed, 977 insertions, 593 deletions
@@ -3,7 +3,7 @@ for any purpose without royalty or fees in accordance with the terms of the copyright. ----------------------------------------------------------------------------- - Copyright (c) 2000-2004 Albrecht Kleine + Copyright (c) 2000-2006 Albrecht Kleine All rights reserved. You may distribute under the terms of the GNU General Public License. @@ -1,4 +1,127 @@ +Mon Jan 23 18:14:21 2006 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm: bugfixed ^T key in empty file (WS edit mode) + -README: merged with README.UTF8 + #214 +----------------------------------------------------------- +Wed Jan 11 20:00:00 2006 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm: various changes: + *replace variable errno with _errno + for "make statc" working again + * chganged max filesize to 1024000 + * bugfix handling ascii character 127 + -Makefile: removed make distinations + test, dync and dync2 + -/contrib directory: removed old stuff + -/bin directory: removed BeOS, QNX and Atheos stuff + + #213 +------------------------------------------------------------ +Sun Jan 8 20:00:00 2006 Albrecht Kleine <kleine@ak.sax.de> + + e3.asm: added UTF8 switcher at cost of 90 byte. + This turns the editor from UTF-8 mode to 7 bit mode + and back. Use the special keys: + ^KU in WS mode / ^QV in Pico mode / ^Y in Nedit mode + ^U in Emacs mode / ESC:u in vi mode + #212 +------------------------------------------------------------ +Sat Jan 7 20:31:02 2006 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm: improved handling of bad formated text + on UTF8 Unicode console (by complete ignoring this + characters). + Also added comments about some unused UTF8-runtime + switcher code. + #211 +-------------------------------------------------------------- +Wed Nov 23 17:41:00 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm: for error free assembling with current YASM + releases added "section .data", also in "make debug" + #210 +------------------------------------------------------------- +Mon Oct 31 11:41:00 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm, e3.h: on NetBSD we are now using some + newer modern system calls: fstat (=279), lseek(=199) + #208,#209 +-------------------------------------------------------------- +Wed Oct 19 20:17:14 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm for NetBSD: replaced linux emulation with + native NetBSD interface + * changed push before int 80h + * added special .note.netbsd.ident (just like openbsd) + #207 + ***** released as v2.6.3 ***** +-------------------------------------------------------------- +Sun Oct 2 17:53:34 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm: added a "near" prefix to a jump + inside InputString (preventing jump distance overflow) + -e3.asm, e3.h, Makefile added special stuff + for running on newer NetBSD (1.6 or 2.0 ) + Edit in Makefile: OS=NETBSD now possible. + (Thanks to Gabor Z. Papp for bug report.) + #206 +-------------------------------------------------------------- +Wed Aug 31 20:00:42 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm: bugfix re-introducing missing error messages + (AMD-64 version only) + +Wed Aug 31 xx:xx:xx 2005 Christian Ostheimer + -e3.c: adapted to mipsel (fritz box fon) + + #205 (Thanks to Christian Ostheimer !!!) +-------------------------------------------------------------- +Sun Feb 27 01:04:56 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm added runtime checking of console status + (started this in #195). This solves some problems + running e3/UTF8 in non-UTF8-terminals like "rxvt". + [ We are trying to keep togeher the UTF-8 bytes + for 1 character also on non UTF-8 terminals. ] + #204 +-------------------------------------------------------------- +Sun Feb 20 10:30:02 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm bugfix: added forgotten line counter trigger + at four special keys (^S,^D,^A,^F). + Thanks for bug report to Pedro Gimeno Fortea ! + -e3.asm: added check against empty string in filename + additional to checking arguments counter. This avoids + a problem of invoking e3 by Midnight Commander + (usually by pressing F14 in mc for editing a new file). + #203 + ***** released as v2.6.2 ***** +-------------------------------------------------------------- +Wed Jan 26 17:32:47 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm,e3.h: bugfixes in system calls for wait4, + execve, fstat, utime: moved data structure to 64bit + #202 +------------------------------------------------------------ +Mon Jan 24 21:36:38 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm, e3.h: changed kernel interfacing on AMD-64 code + for Linux from "int 80h" to syscall. The signal handler + is now set via "rt_sigaction" (was old "sigaction"), + because "sigaction" doesn't seem available. + Now e3-64bit can be traced with 'strace' again (no more + 'strace32'). + #201 +------------------------------------------------------------- +Sun Jan 9 19:13:39 2005 Albrecht Kleine <kleine@ak.sax.de> + + -e3.asm: repaired missing signal handler on + Linux/AMD-64 version. Thx to Andi Kleen. + #200 +------------------------------------------------------------- Mon Jan 3 18:00:48 2005 Albrecht Kleine <kleine@ak.sax.de> + -e3.asm, e3.h: continued 64 bit version, i. e. fixed bugs in commandline reading and numerics -e3.asm:added push ecx / pop ecx pair to save register ECX @@ -7,6 +7,7 @@ OS=LINUX #OS=QNX #OS=ATHEOS #OS=W32 ** please use a separate make.bat for W9x ** +#OS=NETBSD # Set this to gzexe or upx if you want compression # COMPRESS=gzexe @@ -134,28 +135,6 @@ yasm64: $(ASOURCES) Makefile 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 @@ -1,11 +1,10 @@ -README for mini editor e3 release 2.6.1 (aka 2.61) +README for mini editor e3 release 2.7.0 (aka 2.7) -(c) GPL 2000-05 Albrecht Kleine +(c) GPL 2000-06 Albrecht Kleine kleine@ak.sax.de alb.kleine@gmx.de (please use "e3" in mail subject line) - 1. OVERVIEW =========== e3 is a micro text editor with an executable code size between @@ -23,7 +22,7 @@ Also the user can calculate arithmetics inside the text. e3's assembler version is available on 11 most important x86 OS, see below for details. Also available is an (alpha level) 32 bit native code assembler version -for StrongARM ("Advanced Risc Machine") CPUs. +for ARM CPUs in little endian mode. There is also a GNU-C-written version for non-i386-Unix and non-ARM-Linux platforms (e3.c) using Wordstar keybindings only. This README doesn't further mention e3.c. (Just make it!) @@ -32,16 +31,16 @@ e3 is designed to be INDEPENDENT OF LIBC OR ANY OTHER library, except on QNX and Win32. It's been tested using the terminal console, but Xterm, Eterm, -kvt, rxvt, vt220 and vt100 should work too. +kvt, rxvt (no UTF8), vt220 and vt100 should work too. Beginning in version 2.6.0 e3 does support UTF-8 coding of unicode characters like this: α ( <---should be a greek alpha ) e3.asm it's been tested under several x86 32 bit OS: - * Linux kernels 2.0, 2.2, 2.4, 2.6 - * FreeBSD 2.2, 3.1, 4.4, 5.0 + * Linux kernels 2.x + * FreeBSD 2.x-5.0 * OpenBSD 3.4, - * NetBSD 1.51 + * NetBSD 1.6,2.0 * BeOS 5PE * Win98 * QNX RTP 6.1 @@ -56,8 +55,8 @@ e3.s is tested under: * ARM-linux kernel 2.4 (@zaurus PDA) -2a. BUILD on Linux/FreeBSD/BeOS/QNX/Atheos -========================================== +2a. BUILD on Linux/FreeBSD/NetBSD/BeOS/QNX/Atheos (32 bit) +========================================================== A. For assembling of e3 you need NASM assembler. B. If you don't like the default OS or destination (LINUX , /usr/local/ ) @@ -89,12 +88,19 @@ F. Optional: some more editable options are on top of e3.h: G. Take care: If you are building your own e3 binary, be careful: some - NASM versions are producing oversized binaries, some won't - produce a e3.lst listing file: two bugs, but at all harmless. + NASM versions are producing oversized binaries. + + +2b. BUILD on Linux (64 bit) +=========================== +A. For assembling of e3 you need YASM 0.4 assembler. +B. see 2a, except for make, this should be: + make yasm64 -2b. BUILD on Win9x / ME / DOS + +2c. BUILD on Win9x / ME / DOS ============================= A. For assembling of e3 you need NASM assembler v0.98, and ALINK (Anthony's Linker) and Win32 Import Library (win32.lib) @@ -112,20 +118,20 @@ C. Optional: some more editable options are on top of e3.h: your favourite mode. -2c. BUILD on NetBSD,OpenBSD -=========================== -Here are 2 Makefile for BSD-make included. See ./bin directory. -Also you need NASM. In general you don't need to change that files. +2d. BUILD on OpenBSD +==================== +Here is a Makefile for BSD-make included. See ./bin directory. +Also you need NASM. In general you don't need to change that file. -2d. BUILD for ELKS +2e. BUILD for ELKS ================== This is done usual on 32 bit x86 Linux systems either by typing "make elks" or changing to elks/ and typing "make". You need to have installed the ld86 linker (part of dev86 suite). -2e. BUILD for ARM Linux +2f. BUILD for ARM Linux ======================= Simply type "make armlinux" on your x86 box. You will need the ARM linux toolchain, at least @@ -141,27 +147,11 @@ Or adjust 'Makefile' and build e3arm on the destination ARM box. 3. RELEASE NOTES ================ -Only changed Linux/ASM-version: - -* First step: introduced building with YASM assembler, - see http://www.tortall.net/projects/yasm - So added new make destination: "make yasm" - -* Second step: introduced building a 64-bit version - of e3 for Linux/AMD-64. - The program file says: - "e3_64: ELF 64-bit LSB executable, AMD x86-64, - version 1 (SYSV), statically linked, stripped" - -* Both steps are using the sed stream editor. - Thus now we are using 2 converter scripts: - nasm to yasm: e3_nasm_yasm.sed - yasm to 64bit: e3_yasm_yasm64.sed - -* Also fixed a bug first occurs running e3 under 2.6.8 kernels - during the Wait4 system call. - (This crashed sed filtering, e.g. by ^KP in WS mode.) - +* some bugfixes +* AMD 64 bit version: yasm 0.4 can used again +* added runtime switching of UTF-8 edit mode, + see UTF8 section below. +* enhanced max filesize @@ -221,11 +211,14 @@ Some more examples: 1+1*2*3*4*5*6*7*8*9*10=3628801 7.627891*2.643189=20.161958 10000000000/8=1250000000 + +Some problems: 100000000000+1.00001=99999997953.00001 <--loss of precision! 8/0= <--not possible. You know. + (e3 says "beep") 100000000*100000000= <--overflow -Some specials: +Two specials: 12*p=37.699112 <--p is PI 3.14..... r+20=57.699112 <--r is result of last calculation @@ -306,7 +299,51 @@ do NOT expect very high precision. -7. FILES +7. Notes on UTF-8 for the Linux/ASM-version +============================================ + +* By default now e3 does does support UTF-8 coding of unicode + characters like this: α (should be a greek alpha). + +* You could disable UTF-8 support in e3 by editing e3.h at line 16: + from + %define UTF8 + to + ;;; %define UTF8 + and run 'make' again. + +* Running e3_with_disabled_UTF-support at a UTF-8 console + you will see two points .. for UTF-8 characters e.g. the greek alpha. + +* If your terminal does _not_ support UTF-8 it is strongly + recommended to _disable_ UTF8-support in e3.h, + because output of some characters could be scrambled. + +* e3 will _not_ convert your files from/to UTF-8 coding. + It does simply _use_ your terminal encodings. + +* UTF-8 characters like © (c) will look very false on non-UTF-8 terminals, + but e3 can't help here. (So at first use a file converter.) + +* If you simply call e3 without file argument the initial screen of e3 + will tell you whether UTF8-support is built in: + + MicroEditor e3 v2.7.0-UTF8 ©2000-06 + vs. + MicroEditor e3 v2.7.0 (C)2000-06 + +* If it is a version with UTF8 and you are running + e3 in an UTF8 terminal, you can switch the editor + from UTF-8 mode to 7 bit mode and back. + Use the special keys: + ^KU in WS mode + ^QV in Pico mode + ^Y in Nedit mode + ^U in Emacs mode + ESC:u in vi mode + + +8. FILES ======== Makefile - (edit destination path and OS if desired) e3.asm @@ -318,24 +355,21 @@ README - you are reading this ChangeLog - version history COPYING.GPL COPYRIGHT - please read before using e3! -test/* - partial test suite e3c/* - C stuff for non x86 systems, e.g. Alpha -contrib/* - useful things, e.g. e3.spec (== spec for building RPMs) -doswin9x/* - specials for DOS, Win9x and its derivates elks/* - specials for ELKS binaries/* - binaries separated for operating systems armlinux/* - specials for Linux @ ARM RISC CPU *.sed - special stuff for using YASM assembler -8. THANKS +9. THANKS ========= Konstantin Boldyshev <konst at voshod.com> Mark Zealey <mark at itsolve.co.uk> Urs Rau <urs.rau at uk.om.org> Terry Loveall <loveall at qwest.net> David Douthitt <n9ubh at callsign.net> -Björn De Meyer <bjorn.demeyer at pandora.be> +Bjoern De Meyer <bjorn.demeyer at pandora.be> Matthias Kopfermann <kopfermann at trio-hittfeld.de> Tim Wegner <twegner at swbell.net> Michele Andreoli <m.andreoli at tin.it> @@ -346,10 +380,10 @@ Philippe Corbes <philippe.corbes at laposte.net> Charles Steinkuehler <charles at steinkuehler.net> Adrian Bunk <bunk at fs.tum.de> Joseph <joseph at randomnetworks.com> - +Andi Kleen (at suse) -9. TM note -========== +10. TM note +=========== Some names are trademarks of their owners: Linux BSD BeOS QNX Unix WordStar Unox DOS Win Alpha BSE Atheos ELKS ARM BEIN .. etc. diff --git a/README.UTF8 b/README.UTF8 deleted file mode 100644 index a723925..0000000 --- a/README.UTF8 +++ /dev/null @@ -1,54 +0,0 @@ -Some notes on UTF-8 for the Linux/ASM-version: - - -1. -By default now e3 does does support UTF-8 coding of unicode -characters like this: α (should be a greek alpha). - - -2. -You could disable UTF-8 support in e3 by editing e3.h at line 16: -from -%define UTF8 ;for UTF8 console or xterm e.g. @ Suse 9.1 - -to -;;; %define UTF8 ;for UTF8 console or xterm e.g. @ Suse 9.1 - -and run 'make' again. - - -3. -Running e3_with_disabled_UTF-support at a UTF-8 console -you will see two points .. for UTF-8 characters e.g. the greek alpha. - - -4. -If you terminal does _not_ support UTF-8 it is strongly -recommended to _disable_ UTF8-support in e3.h, -because output of some characters could be scrambled. - - -5. -e3 will _not_ convert your files from/to UTF-8 coding. -It does simply _use_ your terminal encodings. - -UTF-8 characters like © (c) will look very false on non-UTF-8 terminals, -but e3 can't help here. (So at first use a file converter.) - - -6. -If you simply call e3 without file argument the initial screen of e3 -will tell you whether UTF8-support is built in: - -MicroEditor e3 v2.6.0-UTF8 GPL © 2000-04 -vs. -MicroEditor e3 v2.6.0 GPL (C) 2000-04 - - - -BTW a runtime detection of UTF-8 console is planned, but not yet ready to use. - - -Enjoy! -Albrecht, -Jun/29/2004 diff --git a/armlinux/e3.s b/armlinux/e3.s index 8c43d51..fdf7c5b 100644 --- a/armlinux/e3.s +++ b/armlinux/e3.s @@ -9,8 +9,15 @@ .equ MAKE_BACKUP,1 @(no value known) .equ LESSWRITEOPS,1 @(no value known) .equ UTF8,1 @(no value known) +.equ UTF8RTS,1 @(no value known) .equ BEEP_IN_VI,1 @(no value known) .equ USE_BUILTINHELP,1 @(no value known) +.ifndef LINUX +.endif +.ifndef UTF8 +.endif +.ifdef NETBSD +.endif .ifdef OPENBSD .endif .ifdef BEOS @@ -25,6 +32,7 @@ .equ TERMIOS_WSIZE,21523 .equ NCCS,19 .equ VMIN,6 +.ifndef AMD64 .equ UIDGID_WORD,1 @(no value known) .struct 0 stat_struc.st_dev: @@ -81,6 +89,7 @@ stat_struc.__unused5: .equ SYS_ioctl,54 .equ SYS_dup2,63 .equ SYS_sigaction,67 +.equ SYS_rt_sigaction,174 .equ SYS_readlink,85 .equ SYS_fchmod,94 .equ SYS_fchown,95 @@ -88,6 +97,10 @@ stat_struc.__unused5: .equ SYS_wait4,114 .equ SYS_select,142 .ifndef ARMCPU +.endif +.else +.endif +.ifndef ARMCPU .else .struct 0 utimbuf_struc.actime: @@ -102,6 +115,8 @@ utimbuf_struc.modtime: .equ NEW_CURSOR_MGNT,1 @(no value known) .purgem CURSORMGNT .else +.ifdef AMD64 +.endif .endif .equ SIGCONT,18 .equ SIGSTOP,19 @@ -187,9 +202,12 @@ utimbuf_struc.modtime: .endif .else .ifdef FREEBSD -.ifndef OPENBSD +.ifdef OPENBSD +.else .endif -.ifndef OPENBSD +.ifdef OPENBSD +.endif +.ifdef NETBSD .endif .ifdef EX .else @@ -308,8 +326,11 @@ _start: CALL SetTermStruc .else .ifdef DYN .else -.ifdef SYS_sigaction +.ifdef SYS_rt_sigaction CALL SetSigHandler +.else +.ifdef SYS_sigaction +.endif .endif .ifdef ATHEOS .endif @@ -356,6 +377,32 @@ prog1: .endif .endif .ifdef UTF8RTS + A_DR r2,getPos + ldr r12,= gPlen + stmfd r13!,{r12} + ldmfd r13!,{r3} + CALL WriteFile0 + A_DR r2,screenbuffer + mov r12,#0xa + stmfd r13!,{r12} + ldmfd r13!,{r3} + CALL ReadFile0 + mov r9,r2 + add r9,r9,r0 + mov r10,#0x2 + sub r9,r9,r10 + ldrB r12,[R9] + bic r0,r0,#0xFF + orr r0,r0,r12 + mov r12,#0x33 + mov r11,r0,lsl #24 + mov r11,r11,lsr #24 + subs r11,r11,r12 + and r11,r11,#0xFF + bic r0,r0,#0xFF + orr r0,r0,r11 + A_DR r12,isUTF8 + strB r0,[r12] .endif ReStart: CALL NewFile @@ -523,7 +570,7 @@ NormChar: CALL ShowBl0 NOEM0: .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif mov r12,r0 and r12,r12,#0xFF @@ -561,7 +608,7 @@ OverWriteChar: strb r0,[r4] add r4,r4,r7 .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif eors r0,r0,r0 mrs r8,CPSR @@ -732,9 +779,15 @@ CompJump2: A_DR r10,jumptab1 add r9,r9,r10 ldrH r1,[R9] +.ifdef YASM +.ifdef AMD64 +.else +.endif +.else A_DR r11,_start adds r1,r1,r11 +.endif stmfd r13!,{r14} add r14,pc,#4 mov pc,r1 @@ -940,6 +993,11 @@ SCloop: mrs r8,CPSR msr CPSR_f,r12 .ifdef UTF8 .ifdef UTF8RTS + A_DR r12,isUTF8 + mov r11,#0x0 + ldrB r10,[r12] + cmp r10,r11 + beq noUTF_C .endif ldrB r12,[r4] bic r1,r1,#0xFF @@ -1095,7 +1153,7 @@ KDloopUTF8: orrcc r12,r12,r8 msr CPSR_f,r12 .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif mov r9,r4 add r9,r9,r0 @@ -1160,7 +1218,7 @@ KeyEmaCtrlT: KeyRight: .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif mrs r8,CPSR and r8,r8,#0x20000000 @@ -1202,6 +1260,7 @@ noUTF_E: bhs KeyRightEnd CALL IsViMode beq KeyRightEnd + CALL CheckENum CALL GoDown KeyRNoMargin: mrs r8,CPSR @@ -1217,6 +1276,7 @@ KeyCLeft3: A_DR r11,sot cmp r4,r11 bls KeyCLEnd + CALL CheckENum mrs r8,CPSR and r8,r8,#0x20000000 mov r11,#0x1 @@ -1255,6 +1315,7 @@ KeyCLEnd: KeyCRight3: CALL CheckEof bhs KeyCREnd + CALL CheckENum b KQZ1 KeyCtrlQZ: mov r12,#0x2f @@ -1606,8 +1667,7 @@ KeyCmddw: CALL CountToWordBeginVIstyle b NO_EM05 KeyCtrlY: - CALL CountToLineBegin - subs r4,r4,r0 + CALL KeyHome CALL CountToLineEnd A_DR r12,mode ldr r11,= WS @@ -2030,6 +2090,13 @@ KVI_KX: beq KeyCtrlKX mov r11,r11,lsr #16 cmp r11,r12 beq KeyHelp +.ifdef UTF8RTS + mov r12,#0x75 + mov r11,r0,lsl #16 + mov r11,r11,lsr #16 + cmp r11,r12 + beq KeyUTF8switch +.endif .ifndef USE_PIPE RET .else @@ -2197,7 +2264,7 @@ KeyVICmdPnLB: KeyLeft: .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif mrs r8,CPSR and r8,r8,#0x20000000 @@ -2243,6 +2310,7 @@ noUTF_F: beq KeyLeftEnd CALL IsViMode beq KeyLeftEnd + CALL CheckENum CALL GoUp KeyLNoMargin: mrs r8,CPSR @@ -2436,10 +2504,16 @@ DispCharLoop: bne DispCharL1 A_DR r12,kurspos str r1,[r12] - A_DR r12,columne - strB r1,[r12] A_DR r12,zloffst ldr r0,[r12] + mov r12,r1 + and r12,r12,#0xFF + mov r11,r0,lsl #24 + mov r11,r11,lsr #24 + adds r11,r11,r12 + and r11,r11,#0xFF + bic r0,r0,#0xFF + orr r0,r0,r11 A_DR r12,columne ldr r10,[r12] adds r10,r10,r0 @@ -2518,7 +2592,7 @@ ELZ3: ldr r12,= NEWLINE mov r11,r11,lsr #24 cmp r11,r12 bhs ELZ9 - mov r12,#0x2e +ELZ99: mov r12,#0x2e bic r0,r0,#0xFF orr r0,r0,r12 ELZ9: @@ -2528,7 +2602,20 @@ ELZ9: mov r11,r11,lsr #24 cmp r11,r12 blo ELZ7 + beq ELZ99 .ifndef UTF8 +.else +.ifdef UTF8RTS + A_DR r12,isUTF8 + mov r11,#0x0 + ldrB r10,[r12] + cmp r10,r11 + bne YXCVB + mov r12,#0x2e + bic r0,r0,#0xFF + orr r0,r0,r12 +YXCVB: +.endif .endif ELZ7: .endif @@ -2539,7 +2626,15 @@ ELZ7: cmp r11,r12 bhs DispEndLine .ifdef UTF8 + mov r12,#0x0 + bic r0,r0,#0xFF00 + orr r0,r0,r12,lsl #8 .ifdef UTF8RTS + A_DR r12,isUTF8 + mov r11,#0x0 + ldrB r10,[r12] + cmp r10,r11 + beq CountByte .endif stmfd r13!,{r0} mov r12,#0xc0 @@ -2554,31 +2649,12 @@ ELZ7: mov r11,r11,lsr #24 cmp r11,r12 ldmfd r13!,{r0} - beq ELUTF8 -noUTF_G: - - mrs r8,CPSR - and r8,r8,#0x20000000 - mov r11,#0x1 - adds r3,r3,r11 - mrs r12,CPSR - orrcc r12,r12,r8 - msr CPSR_f,r12 -ELUTF8: -.else -.endif - A_DR r12,zloffst - ldr r10,[r12] - cmp r3,r10 - bls ELZ5 - strb r0,[r4] - add r4,r4,r7 -.ifdef CURSORMGNT -.endif -.ifdef UTF8 -.ifdef UTF8RTS -.endif + beq UByte234 + blo CountByte stmfd r13!,{r0} + ldrB r12,[r5] + bic r0,r0,#0xFF + orr r0,r0,r12 mov r12,#0xc0 mov r11,r0,lsl #24 mov r11,r11,lsr #24 @@ -2591,22 +2667,46 @@ ELUTF8: mov r11,r11,lsr #24 cmp r11,r12 ldmfd r13!,{r0} - beq ELZ5 -noUTF_H: - -.endif + bne UByte234 +CountByte: + mrs r8,CPSR + and r8,r8,#0x20000000 + mov r11,#0x1 + adds r3,r3,r11 + mrs r12,CPSR + orrcc r12,r12,r8 + msr CPSR_f,r12 mrs r8,CPSR and r8,r8,#0x20000000 mov r12,#0x1 - mov r11,r1,lsl #24 + mov r11,r0,lsl #16 mov r11,r11,lsr #24 adds r11,r11,r12 and r11,r11,#0xFF - bic r1,r1,#0xFF - orr r1,r1,r11 + bic r0,r0,#0xFF00 + orr r0,r0,r11,lsl #8 mrs r12,CPSR orrcc r12,r12,r8 msr CPSR_f,r12 +UByte234: + A_DR r12,zloffst + ldr r10,[r12] + cmp r3,r10 + bls ELZ5 + strb r0,[r4] + add r4,r4,r7 + mov r12,r0,lsr #8 + and r12,r12,#0xFF + mov r11,r1,lsl #24 + mov r11,r11,lsr #24 + adds r11,r11,r12 + and r11,r11,#0xFF + bic r1,r1,#0xFF + orr r1,r1,r11 +.else +.endif +.ifdef CURSORMGNT +.endif ELZ5: b DispCharLoop FillLine: stmfd r13!,{r2} @@ -3000,6 +3100,11 @@ IS0: stmfd r13!,{r1} orr r1,r1,r11 .ifdef UTF8 .ifdef UTF8RTS + A_DR r12,isUTF8 + mov r11,#0x0 + ldrB r10,[r12] + cmp r10,r11 + beq noUTF_I .endif mov r5,r2 ISloopUTF8: @@ -3089,7 +3194,7 @@ DNHloopUTF8: orrcc r12,r12,r8 msr CPSR_f,r12 .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif ldrB r12,[r4] bic r0,r0,#0xFF @@ -3154,7 +3259,7 @@ NHloopUTF8: orrcc r12,r12,r8 msr CPSR_f,r12 .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif ldrB r12,[r4] bic r0,r0,#0xFF @@ -3196,7 +3301,7 @@ NLloopUTF8: orrcc r12,r12,r8 msr CPSR_f,r12 .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif ldrB r12,[r4] bic r0,r0,#0xFF @@ -3267,7 +3372,7 @@ Delete1: msr CPSR_f,r12 DeloopUTF8: -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif ldrB r12,[r5] bic r0,r0,#0xFF @@ -3325,7 +3430,7 @@ NoSpecialKey: cmp r11,r12 blo IS0jj .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif stmfd r13!,{r1} mov r12,r0 @@ -3394,7 +3499,7 @@ NO_INSERT: strb r0,[r4] add r4,r4,r7 .ifdef UTF8 -.ifdef UTF8RTS +.ifdef UTF8RTSx_wont .endif mov r5,r4 mrs r8,CPSR @@ -4147,6 +4252,11 @@ CCV1: mrs r8,CPSR bhs CCVend .ifdef UTF8 .ifdef UTF8RTS + A_DR r12,isUTF8 + mov r11,#0x0 + ldrB r10,[r12] + cmp r10,r11 + beq noUTF_P .endif ldrB r12,[r5] bic r1,r1,#0xFF @@ -4212,6 +4322,8 @@ CountToWordBegin: mov r5,r4 CountNLoop: + cmp r5,r6 + beq CTWend mrs r8,CPSR and r8,r8,#0x20000000 mov r11,#0x1 @@ -5041,6 +5153,10 @@ NewFile: .ifdef AMD64 .else orrs r5,r5,r5 + beq NFnoarg + mov r11,#0x0 + ldrB r10,[r5] + cmp r10,r11 .endif beq NFnoarg A_DR r4,filepath @@ -5079,11 +5195,7 @@ GetFile: PUSH_ALL @(is a macro) mov r9,r0 add r9,r9,r0 - mov r10,#0x0 - mov r8,#0x90 - add r10,r10,r8,lsl #8 - mov r8,#0x1 - add r10,r10,r8,lsl #16 + ldr r10,= max add r9,r9,r10 mov r1,R9 A_DR r12,maxlen @@ -5510,29 +5622,41 @@ No_Ne1: mov r9,r0 mov r10,#0x8 add r9,r9,r10 str r3,[R9] -NOVI0: mov r1,#0x49 +NOVI0: mov r0,#0x20 + mov r8,#0x49 + add r0,r0,r8,lsl #8 mov r8,#0x4e - add r1,r1,r8,lsl #8 + add r0,r0,r8,lsl #16 mov r8,#0x53 - add r1,r1,r8,lsl #16 - mov r8,#0x20 - add r1,r1,r8,lsl #24 + add r0,r0,r8,lsl #24 A_DR r12,insstat mov r11,#0x1 ldrB r10,[r12] cmp r10,r11 beq RSL1 - mov r1,#0x4f + mov r0,#0x20 + mov r8,#0x4f + add r0,r0,r8,lsl #8 mov r8,#0x56 - add r1,r1,r8,lsl #8 + add r0,r0,r8,lsl #16 mov r8,#0x52 - add r1,r1,r8,lsl #16 - mov r8,#0x20 - add r1,r1,r8,lsl #24 + add r0,r0,r8,lsl #24 RSL1: A_DR r12,screenline+4 - str r1,[r12] + str r0,[r12] +.ifdef UTF8RTS + A_DR r12,isUTF8 + mov r11,#0x0 + ldrB r10,[r12] + cmp r10,r11 + bne RSL1a + mov r12,#0x37 + bic r0,r0,#0xFF + orr r0,r0,r12 +RSL1a: A_DR r12,screenline + strB r0,[r12] +.endif A_DR r4,screenline+stdtxtlen mov r9,r2 mov r10,#0x1e @@ -6488,11 +6612,14 @@ Fchmod: Fstat: A_DR r2,fstatbuf .ifdef LIBC .else +.ifdef FREEBSD +.else ldr r12,= SYS_fstat bic r0,r0,#0xFF orr r0,r0,r12 b IntCall .endif +.endif ChownFile: .ifdef LIBC @@ -6536,6 +6663,8 @@ SeekFile: eors r2,r2,r2 .ifdef W32 .else +.ifdef FREEBSD +.else .ifdef BEOS .else .ifdef LIBC @@ -6550,6 +6679,7 @@ SeekFile: .endif .endif .endif +.endif .ifndef LIBC .ifndef W32 IntCall: @@ -6565,10 +6695,16 @@ IntCall2: .ifdef ATHEOS .else .ifdef LINUX +.ifdef AMD64 +.else stmfd r13!,{r1-r6,r14} bl _INT ldmfd r13!,{r1-r6,r14} +.endif .else +.ifdef NETBSD +.else +.endif .endif AfterInt: rsbs r0,r0,#0 @@ -6614,6 +6750,9 @@ Utime: ldr r12,= SYS_utime .ifdef FREEBSD .else .endif +.ifdef AMD64 +.else +.endif .endif Unlink: .ifdef W32 @@ -6644,14 +6783,22 @@ SetSigHandler: ldr r12,= SIGCONT stmfd r13!,{r12} ldmfd r13!,{r1} - eors r3,r3,r3 A_DR r2,sigaction +.ifdef AMD64 +.else A_DR r11,SigHandler str r11,[r2] + eors r3,r3,r3 +.ifdef SIGREST32 +.endif +Sigaction: ldr r12,= SYS_sigaction bic r0,r0,#0xFF orr r0,r0,r12 b ICjmp +.ifdef SIGREST32 +.endif +.endif .endif .ifdef USE_PIPE .ifdef USE_UNDO @@ -6692,6 +6839,11 @@ CCloopUTF8: orrcc r12,r12,r8 msr CPSR_f,r12 .ifdef UTF8RTS + A_DR r12,isUTF8 + mov r11,#0x0 + ldrB r10,[r12] + cmp r10,r11 + beq noUTF_Z .endif ldrB r12,[r4] bic r0,r0,#0xFF @@ -6806,13 +6958,33 @@ OCret: RET .ifdef ROLLBACK .endif .endif +.ifdef UTF8RTS +KeyUTF8switch: + A_DR r12,isUTF8 + ldrB r11,[r12] + mvns r11,r11 + strB r11,[r12] + RET +.endif +.ifdef LINUX +.ifndef CRIPLED_ELF +.data +.code 32 +.endif +.endif .ifdef USE_MATH .endif tempfile2: .byte 'e','3','#','#',0 .ifdef USE_PIPE .ifdef USE_EX_NO_SED +.ifndef AMD64 .else +.endif +.else +.ifndef AMD64 +.else +.endif .ifndef PERLPIPE .else .endif @@ -7049,7 +7221,10 @@ Ktable:.byte DoNo .byte 16 .byte 12 .byte DoNo -.byte DoNo +.ifdef UTF8RTS +.byte 84 +.else +.endif .byte 35 .byte 37 .byte 22 @@ -7164,7 +7339,10 @@ PicoQtable: .else .byte DoNo .endif -.byte DoNo +.ifdef UTF8RTS +.short 84 +.else +.endif .byte DoNo .byte DoNo .byte DoNo @@ -7280,6 +7458,10 @@ jumptab1: .else .short SimpleRet-_start .endif +.ifdef UTF8RTS +.short KeyUTF8switch-_start +.else +.endif .equ jumps1,( . -jumptab1)/esize .short SimpleRet-_start .short KeyCtrlQW-_start @@ -7343,7 +7525,10 @@ jumptab1: .short KeyEmaCtrlR-_start .short KeyEmaCtrlS-_start .short KeyEmaCtrlT-_start -.short SimpleRet-_start +.ifdef UTF8RTS +.short KeyUTF8switch-_start +.else +.endif .short KeyPgDn-_start .short KeyEmaCtrlW-_start .short CtrlXMenu-_start @@ -7423,7 +7608,10 @@ jumptab1: .short KeyEmaCtrlY-_start .short KeyEmaCtrlXW-_start .short KeyEmaCtrlW-_start -.short SimpleRet-_start +.ifdef UTF8RTS +.short KeyUTF8switch-_start +.else +.endif .ifdef SYS_kill .short KeySuspend-_start .else @@ -7463,6 +7651,8 @@ normcurs: .endif .ifdef UTF8 .ifdef UTF8RTS +getPos:.byte 13,195,182,27,'[','6','n',13 +.equ gPlen, . -getPos .endif .endif .ifdef ARMCPU @@ -7472,20 +7662,22 @@ editmode: .byte 'p',' ','W','S','p',' ','P','i','p',' ','E','m','p',' ','N','E' helptext: +.ascii "MicroEditor e3 v2.7.0" .ifdef YASM -.else -.ascii "MicroEditor e3 v2.6.1" .endif .ifdef UTF8 -.ascii "-UTF8 GPL " +.ascii "-UTF8 " .byte 194,169 -.ascii " 2000-04 A.Kleine <kleine@ak.sax.de>" -.byte 10 .else .endif +.ascii "2000-06 A.Kleine" +.byte 10 .ascii "Enter filename or leave with RETURN" .byte 10,10 .ifdef YASM +.ifdef UTF8 +.else +.endif .else .equ helptextsize, . -helptext .if 0 @@ -7547,6 +7739,10 @@ help_ws: .endif .ifdef USE_UNDO .endif +.ifdef UTF8RTS +.byte 10 +.ascii " ^KU UTF8" +.endif .equ help_ws_size, . -help_ws help_pi: @@ -7593,6 +7789,10 @@ help_pi: .endif .ifdef USE_UNDO .endif +.ifdef UTF8RTS +.byte 10 +.ascii " ^QV UTF8" +.endif .equ help_pi_size, . -help_pi help_em: @@ -7643,6 +7843,10 @@ help_em: .endif .ifdef USE_UNDO .endif +.ifdef UTF8RTS +.byte 10 +.ascii " ^U UTF-8" +.endif .equ help_em_size, . -help_em help_vi: @@ -7693,8 +7897,11 @@ help_vi: .byte 10 .ascii ":0,:$,:<line#> ex mode:go BOF,EOF,line" .byte 10 -.ascii ":h ex mode:help" +.ifdef UTF8RTS +.ascii ":h,:u ex mode:help, UTF-8" .byte 10 +.else +.endif .ifndef USE_PIPE .ascii " " .else @@ -7728,6 +7935,10 @@ help_ne: .byte 10 .ascii "Other: ^E Set edit mode" .byte 10 +.ifdef UTF8RTS +.ascii " ^Y UTF8 view" +.byte 10 +.endif .ifdef USE_MATH .endif .ascii " altH Help" @@ -7749,6 +7960,8 @@ errmsgs: .endif .ifdef ATHEOS .endif +.ifdef NETBSD +.endif .ifdef OPENBSD .endif .bss @@ -7829,7 +8042,10 @@ inverse: .space 1*4 insstat: .space 1*4 +.ifdef AMD64 +.else ErrNr:.space 1*4 +.endif .equ errlen,100 error:.space errlen maxlen:.space 1*4 @@ -7851,11 +8067,8 @@ optbuffer: .equ linkbuffersize,4 linkbuffer: .space linkbuffersize -.ifdef AMD64 -.else sigaction: .space 40*4 -.endif perms:.space 1*4 .ifdef SYS_fstat fstatbuf: @@ -7893,6 +8106,7 @@ VInolinebased: PicoSearch: .space 1*4 .ifdef UTF8RTS +isUTF8:.space 1*4 .endif .ifdef USE_PIPE .endif @@ -7914,7 +8128,7 @@ buffercopy: .ifdef W32 .endif .ifdef SYS_brk -.equ max,102400 +.equ max,1024000 .else .endif text:.space max diff --git a/bin/ARM_Linux/README b/bin/ARM_Linux/README index fdc42d5..36abb4e 100644 --- a/bin/ARM_Linux/README +++ b/bin/ARM_Linux/README @@ -8,4 +8,8 @@ machine generated from e3.asm by my translator tool, look on the freshmeat forum for package "cattt". -e3*.ipk is a ready-for-install package for the Z palmtop. +e3*.ipk is a ready-for-install package for the Zaurus palmtop. + + +CONSIDER: this e3 is for ARM CPUs running in +little endian mode only.
\ No newline at end of file diff --git a/bin/ARM_Linux/e3 b/bin/ARM_Linux/e3 Binary files differindex ee6569d..c503e31 100755 --- a/bin/ARM_Linux/e3 +++ b/bin/ARM_Linux/e3 diff --git a/bin/ARM_Linux/e3_2.6.1_arm.ipk b/bin/ARM_Linux/e3_2.6.1_arm.ipk Binary files differdeleted file mode 100644 index bbe451d..0000000 --- a/bin/ARM_Linux/e3_2.6.1_arm.ipk +++ /dev/null diff --git a/bin/ARM_Linux/e3_2.7.0_arm.ipk b/bin/ARM_Linux/e3_2.7.0_arm.ipk Binary files differnew file mode 100644 index 0000000..17c32ca --- /dev/null +++ b/bin/ARM_Linux/e3_2.7.0_arm.ipk diff --git a/bin/Atheos/BUGS b/bin/Atheos/BUGS deleted file mode 100644 index 20d14d2..0000000 --- a/bin/Atheos/BUGS +++ /dev/null @@ -1,8 +0,0 @@ -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 diff --git a/bin/Atheos/e3 b/bin/Atheos/e3 deleted file mode 100755 index f2b03f9..0000000 --- a/bin/Atheos/e3 +++ /dev/null @@ -1,11 +0,0 @@ -#!/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 diff --git a/bin/Atheos/e3em b/bin/Atheos/e3em deleted file mode 120000 index 3e01419..0000000 --- a/bin/Atheos/e3em +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/Atheos/e3ne b/bin/Atheos/e3ne deleted file mode 120000 index 3e01419..0000000 --- a/bin/Atheos/e3ne +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/Atheos/e3pi b/bin/Atheos/e3pi deleted file mode 120000 index 3e01419..0000000 --- a/bin/Atheos/e3pi +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/Atheos/e3vi b/bin/Atheos/e3vi deleted file mode 120000 index 3e01419..0000000 --- a/bin/Atheos/e3vi +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/Atheos/e3ws b/bin/Atheos/e3ws deleted file mode 120000 index 3e01419..0000000 --- a/bin/Atheos/e3ws +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/BeOS/e3 b/bin/BeOS/e3 deleted file mode 100755 index 5192b28..0000000 --- a/bin/BeOS/e3 +++ /dev/null @@ -1,11 +0,0 @@ -#!/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 diff --git a/bin/BeOS/e3em b/bin/BeOS/e3em deleted file mode 120000 index 3e01419..0000000 --- a/bin/BeOS/e3em +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/BeOS/e3ne b/bin/BeOS/e3ne deleted file mode 120000 index 3e01419..0000000 --- a/bin/BeOS/e3ne +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/BeOS/e3pi b/bin/BeOS/e3pi deleted file mode 120000 index 3e01419..0000000 --- a/bin/BeOS/e3pi +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/BeOS/e3vi b/bin/BeOS/e3vi deleted file mode 120000 index 3e01419..0000000 --- a/bin/BeOS/e3vi +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/BeOS/e3ws b/bin/BeOS/e3ws deleted file mode 120000 index 3e01419..0000000 --- a/bin/BeOS/e3ws +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/DOS/README b/bin/DOS/README index 05a950d..ebe473a 100644 --- a/bin/DOS/README +++ b/bin/DOS/README @@ -1,3 +1,7 @@ -e3.exe contains 2 executables in one file, -one for DOS (the 'stub') and one for Win9x +e3.exe contains 2 (two!) +executables in 1 (one!) file, +one for DOS (the 'stub') and one for Win9x. + +Also included the 'stub' itself: e3-16.com, +useful for some space limited DOS rescue disks. diff --git a/bin/DOS/e3-16.com b/bin/DOS/e3-16.com Binary files differnew file mode 100755 index 0000000..811146d --- /dev/null +++ b/bin/DOS/e3-16.com diff --git a/bin/ELKS/e3-16 b/bin/ELKS/e3-16 Binary files differindex 1883f7c..efe46d2 100755 --- a/bin/ELKS/e3-16 +++ b/bin/ELKS/e3-16 diff --git a/bin/FreeBSD/e3 b/bin/FreeBSD/e3 Binary files differindex 5cd99c3..5640c41 100755 --- a/bin/FreeBSD/e3 +++ b/bin/FreeBSD/e3 diff --git a/bin/Linux/README b/bin/Linux/README deleted file mode 100644 index b3397c8..0000000 --- a/bin/Linux/README +++ /dev/null @@ -1,3 +0,0 @@ -Compresed binaries are no more included. -e3 is for UTF-8 consoles -e3_noUTF8 for 'classical' consoles running 'iso-8859-x' etc-
\ No newline at end of file diff --git a/bin/Linux/e3 b/bin/Linux/e3 Binary files differindex 7dfa7e2..4df298b 100755 --- a/bin/Linux/e3 +++ b/bin/Linux/e3 diff --git a/bin/Linux/e3_noUTF8 b/bin/Linux/e3_noUTF8 Binary files differindex f910a2d..00020a7 100755 --- a/bin/Linux/e3_noUTF8 +++ b/bin/Linux/e3_noUTF8 diff --git a/bin/Linux/e3_yasm b/bin/Linux/e3_yasm Binary files differdeleted file mode 100755 index 7b020eb..0000000 --- a/bin/Linux/e3_yasm +++ /dev/null diff --git a/bin/Linux_x86-64/e3-64 b/bin/Linux_x86-64/e3-64 Binary files differnew file mode 100755 index 0000000..eba090f --- /dev/null +++ b/bin/Linux_x86-64/e3-64 diff --git a/bin/Linux_x86-64/e3_64 b/bin/Linux_x86-64/e3_64 Binary files differdeleted file mode 100755 index 0d61c4d..0000000 --- a/bin/Linux_x86-64/e3_64 +++ /dev/null diff --git a/bin/NetBSD/Makefile b/bin/NetBSD/Makefile deleted file mode 100644 index 8cf2699..0000000 --- a/bin/NetBSD/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# 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=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 diff --git a/bin/NetBSD/README b/bin/NetBSD/README deleted file mode 100644 index 2d94a7a..0000000 --- a/bin/NetBSD/README +++ /dev/null @@ -1,4 +0,0 @@ -This release does NOT carry binaries for -NetBSD. Please build your own -using the included Makefiles. You don't -need GNU-make, so BSD-make will do the job. diff --git a/bin/NetBSD/e3 b/bin/NetBSD/e3 Binary files differindex 7129ae0..2498e03 100755 --- a/bin/NetBSD/e3 +++ b/bin/NetBSD/e3 diff --git a/bin/OpenBSD/README b/bin/OpenBSD/README deleted file mode 100644 index bbe8ec0..0000000 --- a/bin/OpenBSD/README +++ /dev/null @@ -1,2 +0,0 @@ -Currently I do not have a OpenBSD system available. -So there is no binary included. Sorry. diff --git a/bin/OpenBSD/e3 b/bin/OpenBSD/e3 Binary files differnew file mode 100755 index 0000000..ad7021c --- /dev/null +++ b/bin/OpenBSD/e3 diff --git a/bin/QNX/e3 b/bin/QNX/e3 deleted file mode 100755 index fedc4f0..0000000 --- a/bin/QNX/e3 +++ /dev/null @@ -1,11 +0,0 @@ -#!/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 diff --git a/bin/QNX/e3em b/bin/QNX/e3em deleted file mode 120000 index 3e01419..0000000 --- a/bin/QNX/e3em +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/QNX/e3ne b/bin/QNX/e3ne deleted file mode 120000 index 3e01419..0000000 --- a/bin/QNX/e3ne +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/QNX/e3pi b/bin/QNX/e3pi deleted file mode 120000 index 3e01419..0000000 --- a/bin/QNX/e3pi +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/QNX/e3vi b/bin/QNX/e3vi deleted file mode 120000 index 3e01419..0000000 --- a/bin/QNX/e3vi +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/QNX/e3ws b/bin/QNX/e3ws deleted file mode 120000 index 3e01419..0000000 --- a/bin/QNX/e3ws +++ /dev/null @@ -1 +0,0 @@ -e3
\ No newline at end of file diff --git a/bin/Win9x/e3.exe b/bin/Win9x/e3.exe Binary files differindex 4681ee3..daac700 100755 --- a/bin/Win9x/e3.exe +++ b/bin/Win9x/e3.exe diff --git a/contrib/README.tinlink624 b/contrib/README.tinlink624 deleted file mode 100644 index 8462d8b..0000000 --- a/contrib/README.tinlink624 +++ /dev/null @@ -1,16 +0,0 @@ -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 ------------------------------------------------- diff --git a/contrib/ewrapper.sh b/contrib/ewrapper.sh deleted file mode 100755 index 223e6a3..0000000 --- a/contrib/ewrapper.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/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 - diff --git a/contrib/pico b/contrib/pico deleted file mode 100755 index d99a138..0000000 --- a/contrib/pico +++ /dev/null @@ -1,60 +0,0 @@ -#!/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 - - - - - - - - - - - diff --git a/debian/changelog b/debian/changelog index 35f68e1..5fa1695 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +e3 (1:2.70-1) unstable; urgency=low + + * New upstream version + * Updated to current debhelper + + -- Pawel Wiecek <coven@debian.org> Wed, 29 Mar 2006 23:32:05 +0200 + e3 (1:2.61-2) unstable; urgency=low * Added kfreebsd-i386 to arch list (closes: #314337) diff --git a/debian/control b/debian/control index 4812831..4aba7cb 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: e3 Section: editors Priority: optional Maintainer: Pawel Wiecek <coven@debian.org> -Build-Depends: debhelper (>> 3.0.0), nasm, upx-ucl +Build-Depends: debhelper (>> 4.0.0), nasm, upx-ucl Standards-Version: 3.6.2 Package: e3 diff --git a/debian/rules b/debian/rules index c46b350..00003e7 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ #export DH_VERBOSE=1 # This is the debhelper compatability version to use. -export DH_COMPAT=3 +export DH_COMPAT=4 configure: configure-stamp configure-stamp: diff --git a/doswin9x/e3-16.asm b/doswin9x/e3-16.asm deleted file mode 120000 index d5eade2..0000000 --- a/doswin9x/e3-16.asm +++ /dev/null @@ -1 +0,0 @@ -../e3-16.asm
\ No newline at end of file diff --git a/doswin9x/e3.asm b/doswin9x/e3.asm deleted file mode 120000 index 79f5882..0000000 --- a/doswin9x/e3.asm +++ /dev/null @@ -1 +0,0 @@ -../e3.asm
\ No newline at end of file diff --git a/doswin9x/e3.h b/doswin9x/e3.h deleted file mode 120000 index d3f17af..0000000 --- a/doswin9x/e3.h +++ /dev/null @@ -1 +0,0 @@ -../e3.h
\ No newline at end of file diff --git a/doswin9x/make.bat b/doswin9x/make.bat deleted file mode 100644 index c923cf6..0000000 --- a/doswin9x/make.bat +++ /dev/null @@ -1,18 +0,0 @@ -@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
-@rem 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
@@ -1,6 +1,6 @@ ;------------------------------------------------------------------------- ; -; Copyright (C) 2002,03 Albrecht Kleine <kleine@ak.sax.de> +; Copyright (C) 2002-2005 Albrecht Kleine <kleine@ak.sax.de> ; ; This program is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License @@ -346,6 +346,7 @@ KeyRightEnd:ret ;------- KeyCLeft3:call CheckBOF ;cmp di,sot bzw sot-1 jbe KeyCLEnd + mov byte [numeriere],1 dec di %ifndef ELKS dec di @@ -360,6 +361,7 @@ KeyCLEnd:ret ;------- KeyCRight3:call CheckEOF jae KeyCREnd + mov byte [numeriere],1 inc di KeyCtrlRight:call KeyRight jz KeyCRight3 @@ -1,6 +1,6 @@ ;-------------------------------------------------------------------- ; -; e3.asm v2.6.1 Copyright (C) 2000-2005 Albrecht Kleine <kleine@ak.sax.de> +; e3.asm v2.7.0 Copyright (C) 2000-2006 Albrecht Kleine <kleine@ak.sax.de> ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by @@ -121,9 +121,13 @@ NoArg: mov eax,mode mov byte [eax],DEFAULT_MODE ;store current editor mode (WS only) %undef CURSORMGNT %else ;-------------- i.e. Linux, FreeBSD, QNX, Ath ------------------ +%ifdef SYS_rt_sigaction + call SetSigHandler +%else %ifdef SYS_sigaction call SetSigHandler %endif +%endif ;------- %ifdef ATHEOS pop edx @@ -188,7 +192,7 @@ moreenv:pop ecx jnz ReStart add byte[revvoff],boldlen ;special inverse cursor on linux terminals %endif -%ifdef UTF8RTS ;==currently unused by default +%ifdef UTF8RTS mov ecx,getPos ;second argument: pointer to message to write push byte gPlen ;third argument: message length pop edx @@ -196,12 +200,10 @@ moreenv:pop ecx mov ecx,screenbuffer ;pointer to buf push byte 10 pop edx - call ReadFile0 + call ReadFile0 ;get cursor pos mov al,[ecx+eax-2] ;al == '2' @ UTF8 terminal, else al == '3' - cmp al,'2' - jne noUTFterm + sub al,'3' mov byte [isUTF8],al -noUTFterm: %endif ;------- ReStart:call NewFile @@ -315,9 +317,9 @@ NormChar:test byte [mode], EM | PI call ShowBl0 ;i.e. "mov byte [showblock],0" NOEM0: %ifdef UTF8 -%ifdef UTF8RTS - cmp byte [isUTF8],0 - je noUTF_A +%ifdef UTF8RTSx_wont ;won't overwrite more than one single ASCII byte at once... + cmp byte [isUTF8],0 ;...with a 2- or 3-byte UTF-8 character entered from keyboard. + je noUTF_A ;So @ non-UTF8 consoles byte 2,3,... are always inserted. %endif mov bl,al and bl,0C0h @@ -348,9 +350,9 @@ noEOL: OverWriteChar:cld stosb %ifdef UTF8 -%ifdef UTF8RTS - cmp byte [isUTF8],0 - je noUTF_B +%ifdef UTF8RTSx_wont ;won't produce incomplete UTF8 characters: .... + cmp byte [isUTF8],0 ;...so one single ASCII will overwrite a complete... + je noUTF_B ;...UTF8 byte sequence at once. %endif xor eax,eax dec eax @@ -427,7 +429,15 @@ CompJump2:mov bh,0 lea ebx,[bx] ;1 byte shorter than 'and ebx,0ffh' %endif movzx ebx,word [2*ebx+jumptab1] ;2*ebx is due 2 byte per entry +%ifdef YASM +%ifdef AMD64 + add rbx,0x400000b0 +%else + add ebx,0x08048080 ;most ugly work around ever written +%endif +%else add ebx,_start ;offset inside code +%endif ;------- call ebx ;the general code jump dispatcher ;------- @@ -550,8 +560,8 @@ SetColumn:mov ecx,[ch2linebeg] ;=maximal columns SCloop: inc edi %ifdef UTF8 %ifdef UTF8RTS - cmp byte [isUTF8],0 - je noUTF_C + cmp byte [isUTF8],0 ;if the tty can't handle UTF8.. + je noUTF_C ;..each byte is one column %endif mov bl,byte [edi] and bl,0C0h @@ -640,9 +650,9 @@ KeyDel: cmp edi,ebp xor eax,eax ;delete one @ cursor KDloopUTF8:inc eax %ifdef UTF8 -%ifdef UTF8RTS - cmp byte [isUTF8],0 - je noUTF_D +%ifdef UTF8RTSx_wont ;won't produce incomplete UTF8 characters: .... + cmp byte [isUTF8],0 ;...so pressing DEL single will delete a complete.. + je noUTF_D ...UTF8 byte sequence at once. %endif mov bl,byte [edi+eax] and bl,0C0h @@ -691,8 +701,8 @@ KECT: ;------- KeyRight: %ifdef UTF8 -%ifdef UTF8RTS - cmp byte [isUTF8],0 +%ifdef UTF8RTSx_wont ;try to keep UTF8 bytes together.. + cmp byte [isUTF8],0 ;...also if the console can not display the UTF8 character je noUTF_E %endif inc edi @@ -709,12 +719,14 @@ noUTF_E: jae KeyRightEnd call IsViMode je KeyRightEnd ;no more line wrap around in vi mode + call CheckENum ;Sun Feb 20 2005 call GoDown KeyRNoMargin:inc edi KeyRightEnd:ret ;------- KeyCLeft3:cmp edi,sot jbe KeyCLEnd + call CheckENum ;Sun Feb 20 2005 dec edi KeyCtrlQW:cmp byte [edi-1],NEWLINE jz KeyCLeft3 @@ -727,6 +739,7 @@ KeyCLEnd:ret ;------- KeyCRight3:call CheckEof jae KeyCREnd + call CheckENum ;Sun Feb 20 2005 jmp short KQZ1 KeyCtrlQZ:mov al,2fh cmp byte [edi],NEWLINE @@ -918,8 +931,7 @@ KCQY: KeyCmddw:call CountToWordBeginVIstyle jmp short NO_EM05 ;------- -KeyCtrlY:call CountToLineBegin - sub edi,eax ;edi at begin +KeyCtrlY:call KeyHome ;edi at begin call CountToLineEnd cmp byte[mode],WS jnz NO_WS01 @@ -1157,6 +1169,10 @@ KVI_KX: je KeyCtrlKX je near KeyVICmdE cmp ax,'h' je near KeyHelp +%ifdef UTF8RTS + cmp ax,'u' + je near KeyUTF8switch +%endif %ifndef USE_PIPE ret %else @@ -1253,7 +1269,7 @@ KeyVICmdPnLB:call KeyVICP2 ;------- cont KeyLeft: %ifdef UTF8 -%ifdef UTF8RTS +%ifdef UTF8RTSx_wont ;see KeyRight comment cmp byte [isUTF8],0 je noUTF_F %endif @@ -1271,6 +1287,7 @@ noUTF_F: je KeyLeftEnd call IsViMode je KeyLeftEnd ;no more line wrap around in vi mode + call CheckENum ;Sun Feb 20 2005 call GoUp KeyLNoMargin:dec edi %ifdef W32LF @@ -1386,8 +1403,8 @@ DispCharLoop: cmp byte[tabcnt],0 jnz DispCharL1 mov [kurspos],ebx - mov byte [columne],bl mov eax,[zloffst] ;chars scrolled left hidden + add al,bl add [columne],eax %ifdef CURSORMGNT stc @@ -1421,54 +1438,63 @@ ELZ3: cmp al,NEWLINE %endif cmp al,SPACECHAR jae ELZ9 ;simply ignore chars like carriage_return etc. - mov al,'.' +ELZ99: mov al,'.' ELZ9: %ifndef W32 cmp al,7fh jb ELZ7 + je ELZ99 %ifndef UTF8 mov al,'.' +%else +%ifdef UTF8RTS + cmp byte [isUTF8],0 + jne YXCVB + mov al,'.' +YXCVB: +%endif %endif ELZ7: %endif cmp bl,byte [columns] ;screen width jae DispEndLine ;continue reading line until end +;------- %ifdef UTF8 + mov ah,0 %ifdef UTF8RTS cmp byte [isUTF8],0 - je noUTF_G + je CountByte %endif push eax and al,0c0h cmp al,080h pop eax - jz ELUTF8 ;do NOT count -noUTF_G: - inc edx -ELUTF8: + jz UByte234 ;MSB 10...... =do not count + jb CountByte ;MSB 01...... 00...... count valid 7bit ASCII + push eax + mov al,byte [esi] ;check next byte for vaild UTF8 follower byte + and al,0C0h + cmp al,80h ;is UTF8 byte 2,3,4,.. ? + pop eax + jnz UByte234 ;no do not count wrong UTF8 starter byte +CountByte:inc edx + inc ah ;1 +UByte234:cmp edx,[zloffst] + jbe ELZ5 ;loaded new char (but won't display) + stosB + add bl,ah ;i.e. add 0 or 1 to curser column position counter %else - inc edx ;also count hidden chars (left margin) -%endif + inc edx cmp edx,[zloffst] - jbe ELZ5 ;load new char (but no display) + jbe ELZ5 ;loaded new char (but won't display) stosB + inc bl +%endif +;------- %ifdef CURSORMGNT clc call SetInverseStatus %endif -%ifdef UTF8 -%ifdef UTF8RTS - cmp byte [isUTF8],0 - je noUTF_H -%endif - push eax - and al,0c0h - cmp al,080h - pop eax - jz ELZ5 -noUTF_H: -%endif - inc bl ;counts displayed chars only ELZ5: jmp DispCharLoop ;------- FillLine:push ecx ;continue rest of line @@ -1781,8 +1807,6 @@ InputString0:call WriteMess9MakeLine ; expecting max count byte in edx ; return length in eax, CY for empty string (or user abort) ; -; *** added some more line editing (ak, Mon Apr 12 2004) *** -; InputString:push ecx push edi push byte 2 @@ -1793,7 +1817,7 @@ InputString:push ecx mov ebx,[columns] %ifndef LINUX dec ebx ;*BSD do not use lower right screen place... -%endif ;...due some unwanted vertical scrollung +%endif ;...due some unwanted vertical scrolling lea ebx,[ebx-stdtxtlen] cmp edx,ebx ;TODO should enable some scrolling: jb IS8 ;not yet ready, so truncate at end of line @@ -1866,7 +1890,7 @@ DNHloopUTF8: ;------- dec edi ;go 1 left %ifdef UTF8 -%ifdef UTF8RTS +%ifdef UTF8RTSx_wont ;Keep UTF8 bytes together even in deleting cmp byte [isUTF8],0 je noUTF_J %endif @@ -1902,7 +1926,7 @@ NHloopUTF8: je IS0j dec edi %ifdef UTF8 -%ifdef UTF8RTS +%ifdef UTF8RTSx_wont ;see KeyLeft comment cmp byte [isUTF8],0 je noUTF_K %endif @@ -1921,9 +1945,9 @@ NLloopUTF8: je IS0j inc edi %ifdef UTF8 -%ifdef UTF8RTS +%ifdef UTF8RTSx_wont ;see KeyRight comment cmp byte [isUTF8],0 - je noUTF_L + je near IS0 %endif mov al,byte [edi] and al,0c0h @@ -1956,7 +1980,7 @@ Delete1:lea esi,[ecx+ebx] ;do not delete at last character position lea esi,[edi+1] dec ebx ;decrease char count in buffer DeloopUTF8: -%ifdef UTF8RTS +%ifdef UTF8RTSx_wont ;Keep UTF8 bytes together even in deleting cmp byte [isUTF8],0 je noUTF_M %endif @@ -1989,7 +2013,7 @@ NoSpecialKey: jb short IS0jj %ifdef UTF8 -%ifdef UTF8RTS +%ifdef UTF8RTSx_wont ;Keep UTF8 bytes together cmp byte [isUTF8],0 je noUTF_N %endif @@ -2019,7 +2043,7 @@ INSrt: PUSH_ALL NO_INSERT:cld stosb %ifdef UTF8 -%ifdef UTF8RTS +%ifdef UTF8RTSx_wont ;Keep UTF8 bytes together cmp byte [isUTF8],0 je noUTF_O %endif @@ -2425,7 +2449,9 @@ CountToWordBeginVIstyle: ;output eax=chars up there ja CtWviStyle CountToWordBegin: ;output eax=chars up there mov esi,edi -CountNLoop:inc esi +CountNLoop:cmp esi,ebp + jz CTWend + inc esi %ifdef W32LF cmp byte [esi],RETURN %else @@ -2932,8 +2958,12 @@ NewFile:cld call InitVars %ifdef AMD64 or rsi,rsi + jz NFnoarg + cmp byte [rsi],0 %else or esi,esi + jz NFnoarg + cmp byte [esi],0 %endif jz NFnoarg mov edi,filepath @@ -2972,7 +3002,7 @@ GetFile: %ifdef SYS_brk call Seek PUSH_ALL - lea ebx,[eax+eax+102400] ;twice filesize plus reserve = space for inserts + lea ebx,[eax+eax+max] ;twice filesize plus reserve = space for inserts mov [maxlen],ebx add ebx,text call SysBrk @@ -3266,11 +3296,17 @@ No_Em1: cmp byte [esi],NE mov edx,[ebx+12] No_Ne1: mov [eax+8],edx ;------- -NOVI0: mov ebx,'INS ' ;Insert +NOVI0: mov eax,' INS' ;Insert cmp byte [insstat],1 jz RSL1 - mov ebx,'OVR ' ;Overwrite -RSL1: mov [screenline+4],ebx ;mode status + mov eax,' OVR' ;Overwrite +RSL1: mov [screenline+4],eax ;mode status +%ifdef UTF8RTS + cmp byte [isUTF8],0 + jnz RSL1a + mov al,'7' ;"7bit_non_utf8" status +RSL1a: mov byte [screenline],al +%endif mov edi,screenline+stdtxtlen lea ecx,[ecx-(stdtxtlen+15+5)] ;space for other than filename mov esi,filepath ;lea ... is shorter than sub ecx,stdtxtlen+15+5 @@ -3722,7 +3758,7 @@ IOctlTerminal:mov ebx,stdin ;expects EDX termios or winsize structure ptr push ecx push ebx call ioctl - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -3840,7 +3876,7 @@ ReadFileOkay: push ecx push ebx call read - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -3899,7 +3935,7 @@ WFile: pop eax push ecx push ebx call write - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -3952,7 +3988,7 @@ OpenFileOkay:ret push ecx push ebx call open - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -3981,7 +4017,7 @@ CloseFile: push ecx ;destr push ebx call close - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -4005,7 +4041,7 @@ Fchmod: push ecx push ebx call fchmod - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -4023,16 +4059,21 @@ Fstat: mov ecx,fstatbuf push ecx push ebx call fstat - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx or eax,eax ret %else +%ifdef FREEBSD ;includes NET-BSD + mov ax,SYS_fstat + jmp short IntCall2 +%else mov al,SYS_fstat jmp short IntCall %endif +%endif ;------- ChownFile: %ifdef LIBC @@ -4040,7 +4081,7 @@ ChownFile: push ecx push ebx call fchown - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -4078,7 +4119,7 @@ RenameFileOkay: push ecx push ebx call rename - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -4121,6 +4162,21 @@ SeekFile:xor ecx,ecx ;ecx offset / ebx file / edx method neg eax SeekFileOkay:ret %else +%ifdef FREEBSD ;31 October 2005: 64 bit offset initial for *BSD + push edi ;ebx=fh/ecx=dummy/edx,esi=offset/edi=where + push esi + xor esi,esi + xor edi,edi + xchg edx,edi + mov al,SYS_lseek + call IntCall + neg eax + mov [ErrNr],eax + neg eax ;set flags also + pop esi + pop edi + ret +%else %ifdef BEOS mov al,SYS_lseek ;4 stack places (using 64 bit for ptr) push edi @@ -4140,7 +4196,7 @@ SeekFileOkay:ret push ecx push ebx call lseek - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -4155,6 +4211,7 @@ SeekFileOkay:ret %endif %endif %endif +%endif ;------- %ifndef LIBC %ifndef W32 @@ -4193,15 +4250,36 @@ Fru: neg eax ret %else %ifdef LINUX +%ifdef AMD64 + push rbx + push rcx + push rsi + push rdi + xchg rbx,rdi + xchg rcx,rsi + xchg rbx,r8 + mov r10,rcx ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + syscall + pop rdi + pop rsi + pop rcx + pop rbx +%else int 80h +%endif %else push edi push esi push edx push ecx push ebx +%ifdef NETBSD + push dword nbsdint +%else push eax +%endif int 80h +nbsdint: pop ebx pop ebx pop ecx @@ -4252,7 +4330,7 @@ Select: push dword timevalsec push ebx call select push ebx - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx add esp,20 @@ -4307,8 +4385,13 @@ Execve: mov al,SYS_execve jmp short IntCall ;------- Wait4: mov al,SYS_wait4 ;set ecx to buffer! +%ifdef AMD64 + xor rbx,rbx + dec rbx +%else xor ebx,ebx dec ebx +%endif xor edx,edx xor esi,esi jmp short IntCall @@ -4330,7 +4413,7 @@ Unlink: push ecx push ebx call unlink - mov ebx,[errno] + mov ebx,[_errno] mov [ErrNr],ebx pop ebx pop ecx @@ -4357,11 +4440,36 @@ ICjmp: jmp short IntCall SetSigHandler: push byte SIGCONT pop ebx - xor edx,edx mov ecx,sigaction +%ifdef AMD64 + mov rdx,qword SigHandler + mov qword [rcx],rdx + mov qword [rcx+8],4000000h ;flags @ 8 + mov rdx,qword SigRestorer + mov qword [rcx+16],rdx ;restorer @ 16 + xor edx,edx + mov esi,8 + mov al,SYS_rt_sigaction + jmp short ICjmp +;------- +SigRestorer:mov eax,SYS_rt_sigreturn + syscall ;thanks to Andi Kleen for info +%else mov [ecx],dword SigHandler + xor edx,edx +%ifdef SIGREST32 ;just like on AMD-64 would be: + mov dword [ecx+8],4000000h + mov [ecx+12],dword SigRestorer32 +%endif Sigaction:mov al,SYS_sigaction jmp short ICjmp +;------- +%ifdef SIGREST32 +SigRestorer32:pop eax + mov eax,119 ;sigreturn + int 80h ;syscall +%endif +%endif %endif ;----------------------------------------------------------------------- ; @@ -5168,7 +5276,17 @@ InitUndoFrame:mov edx,[undoptr] ;get current frame mov [undoptr],edx IUFret: ret %endif +%ifdef UTF8RTS +KeyUTF8switch:not byte [isUTF8] + ret +%endif ;---------------------------------------------------------------------- +%ifdef LINUX +%ifndef CRIPLED_ELF +section .data +bits 32 +%endif +%endif ; ; CONSTANT DATA AREA ; @@ -5179,20 +5297,35 @@ tempfile2 db 'e3##',0 ;tempfile (FIXME: use PID for name) %ifdef USE_PIPE tempfile db 'e3$$',0 ;tempfile (FIXME: use PID for name) %ifdef USE_EX_NO_SED +%ifndef AMD64 exargs dd expath dd minus_s dd tempfile dd 0 +%else +exargs dq expath + dq minus_s + dq tempfile + dq 0 +%endif expath db EX_PATH,0 minus_s db '-s',0 wq_suffix db LINEFEED,'wq',LINEFEED wq_suffix_len equ $-wq_suffix %else +%ifndef AMD64 sedargs dd sedpath ;this way default dd minus_e dd optbuffer dd tempfile dd 0 +%else +sedargs dq sedpath ;this way default + dq minus_e + dq optbuffer + dq tempfile + dq 0 +%endif sedpath db SEDPATH,0 %ifndef PERLPIPE minus_e db '-e',0 @@ -5458,7 +5591,11 @@ Ktable db DoNo ;^K@ xlatb table for making pseudo-scancode db 10h ;^kr db 0ch ;^ks db DoNo ;^kt +%ifdef UTF8RTS + db 54h ;^ku ^KU UTF8 view switcher +%else db DoNo ;^ku +%endif db 23h ;^kv db 25h ;^kw db 16h ;^kx @@ -5574,7 +5711,11 @@ PicoQtable db DoNo ;^q@ Quick motions for PI mode: wordstar counterparts on diff %else db DoNo ;^qu %endif +%ifdef UTF8RTS + dw 54h ;^qv UTF8 switcher +%else db DoNo ;^qv +%endif db DoNo ;^qw db DoNo ;^qx db DoNo ;^qy @@ -5711,6 +5852,11 @@ jumptab1: ;Storing 16 bit offsets is valid only for code less size 64 kbyte... %else dw SimpleRet -_start ;53h %endif +%ifdef UTF8RTS + dw KeyUTF8switch-_start ;54h general +%else + dw SimpleRet -_start ;54h +%endif jumps1 equ ($-jumptab1) / esize ;--- 32 more for WS-------- dw SimpleRet -_start ;^Space @@ -5779,7 +5925,12 @@ jumps1 equ ($-jumptab1) / esize dw KeyEmaCtrlR -_start ;^r dw KeyEmaCtrlS -_start ;^s dw KeyEmaCtrlT -_start ;^t - dw SimpleRet -_start ;^u (not yet planned) +%ifdef UTF8RTS + dw KeyUTF8switch-_start ;^u UTF8 mode switcher + ; (ATTENZIONE: that is NOT emacs stuff like: 'C-u runs the command universal-argument') +%else + dw SimpleRet -_start ;^u +%endif dw KeyPgDn -_start ;^v dw KeyEmaCtrlW -_start ;^w dw CtrlXMenu -_start ;^x @@ -5788,7 +5939,7 @@ jumps1 equ ($-jumptab1) / esize dw KeySuspend -_start ;^z %else dw SimpleRet -_start ;51h -%endif +%endif dw SimpleRet -_start ;1b dw SimpleRet -_start ;1c dw SimpleRet -_start ;1d @@ -5828,7 +5979,7 @@ jumps1 equ ($-jumptab1) / esize %ifdef SYS_kill dw KeySuspend -_start ;^z 1A (not in pico) %else - dw SimpleRet -_start ;51h + dw SimpleRet -_start ;^z %endif dw SimpleRet -_start ;^[ 1B dw SimpleRet -_start ;^\ 1C @@ -5865,11 +6016,15 @@ jumps1 equ ($-jumptab1) / esize dw KeyEmaCtrlY -_start ;^v 16 PASTE dw KeyEmaCtrlXW -_start ;^w 13 SAVE_AS/WRITE TO dw KeyEmaCtrlW -_start ;^x 18 CUT +%ifdef UTF8RTS + dw KeyUTF8switch-_start ;^y 19 +%else dw SimpleRet -_start ;^y 19 +%endif %ifdef SYS_kill dw KeySuspend -_start ;^z 1A %else - dw SimpleRet -_start ;51h + dw SimpleRet -_start ;^z %endif dw SimpleRet -_start ;^[ 1B dw SimpleRet -_start ;^\ 1C @@ -5907,7 +6062,8 @@ jumps1 equ ($-jumptab1) / esize ;------- %ifdef UTF8 %ifdef UTF8RTS - getPos db 13, 0ceh, 94h,27,'[6n',13 ;write carriage_return, followed by 1 UTF8 char + getPos db 13, 0c3h, 0B6h,27,'[6n',13 ;write carriage_return, followed by 1 UTF8 char + ;german umlaut oe = ö in UTF-8 gPlen equ $-getPos ;and clean up with another carriage_return ;Terminal should answer ESC[<line>;<column>R %endif ;on UTF8 terminals should be column==2 else ==3 @@ -5919,19 +6075,23 @@ align 2 editmode:db 'p WSp Pip Emp NE' ; helptext: +db "MicroEditor e3 v2.7.0" %ifdef YASM -db "MicroEditor e3-YASM v2.6.1" -%else -db "MicroEditor e3 v2.6.1" +db "Y" %endif %ifdef UTF8 -db "-UTF8 GPL ",0C2h,0A9h," 2000-04 A.Kleine <kleine@ak.sax.de>",10 +db "-UTF8 ",0C2h,0A9h %else -db " GPL (C) 2000-05 A.Kleine <kleine@ak.sax.de>",10 +db " (C)" %endif +db "2000-06 A.Kleine",10 db "Enter filename or leave with RETURN",10,10 %ifdef YASM -helptextsize equ 70h +%ifdef UTF8 +helptextsize equ 54h +%else +helptextsize equ 50h +%endif %else helptextsize equ $-helptext %if helptextsize>127 @@ -5985,6 +6145,9 @@ db " ^KZ Suspend " %ifdef USE_UNDO db " ^U Undo" %endif +%ifdef UTF8RTS +db 10," ^KU UTF8" +%endif help_ws_size equ $-help_ws ;------------------------- help_pi: @@ -6023,6 +6186,9 @@ db " ^Z Suspend" %ifdef USE_UNDO db " ^QU Undo" %endif +%ifdef UTF8RTS +db 10," ^QV UTF8" +%endif help_pi_size equ $-help_pi ;------------------------- help_em: @@ -6067,6 +6233,9 @@ db " ^Z Suspend" %ifdef USE_UNDO db " ^_ Undo" %endif +%ifdef UTF8RTS +db 10," ^U UTF-8" +%endif help_em_size equ $-help_em ;------------------------- help_vi: @@ -6104,7 +6273,11 @@ db "; E3 SPECIAL:set edit mode",10 %endif db ":w,:wq,:x,:q,:q!,:e ex mode:save,quit,save_as,edit other",10 db ":0,:$,:<line#> ex mode:go BOF,EOF,line",10 +%ifdef UTF8RTS +db ":h,:u ex mode:help, UTF-8",10 +%else db ":h ex mode:help",10 +%endif %ifndef USE_PIPE db " " %else @@ -6130,6 +6303,9 @@ db " ^A All buffer",10 db " ^X Cut ^C Copy ^V Paste",10 db 10 db "Other: ^E Set edit mode",10 +%ifdef UTF8RTS +db " ^Y UTF8 view",10 +%endif %ifdef USE_MATH db " ^K Calculate",10 %endif @@ -6174,6 +6350,16 @@ section .data ;unused in Linux/FreeBSD/BeOS: save byte in ELF header bits 32 ;unused in W32: save byte in PE header %endif ;----------------------------------------------------------------------- +%ifdef NETBSD ;added Sun Oct 9 10:10:00 CEST 2005 +section .note.netbsd.ident +align 4 + dd 7 + dd 4 + dd 1 + db "NetBSD",0,0 + dd 0 +%endif +;----------------------------------------------------------------------- %ifdef OPENBSD section .note.openbsd.ident align 4 @@ -6249,8 +6435,12 @@ read_b resd 1 ;buffer for getchar isbold resd 1 ;control of bold display of ws-blocks inverse resd 1 insstat resd 1 -ErrNr resd 1 ;used similar libc errno, but not excactly equal +%ifdef AMD64 +ErrNr resq 1 +%else +ErrNr resd 1 ;used similar libc errno, but not excactly equal +%endif errlen equ 100 error resb errlen ;reserved space for string: 'ERROR xxx:tttteeeexxxxtttt',0 @@ -6267,11 +6457,7 @@ suchtext2 resb maxfilenamelen+1 ;for PICO mode optbuffer resb optslen ;buffer for search/replace options and for ^QI linkbuffersize equ 4 linkbuffer resb linkbuffersize -%ifdef AMD64 -sigaction resq 40 -%else sigaction resd 40 -%endif ;------ perms resd 1 %ifdef SYS_fstat @@ -6338,7 +6524,7 @@ buffercopy resb buffercopysize %endif %ifdef SYS_brk - max equ 102400 ;valid for NEW created files only + max equ 1024000 ;valid for NEW created files only %else max equ 10240000 %endif @@ -1,5 +1,5 @@ ;-------------------------------------------------------------------------- -; e3.asm v2.6.1 Copyright (C) 2000-05 Albrecht Kleine <kleine@ak.sax.de> +; e3.asm v2.7.0 Copyright (C) 2000-06 Albrecht Kleine <kleine@ak.sax.de> ; ; see GNU copyright details in e3.asm ;-------------------------------------------------------------------------- @@ -14,6 +14,7 @@ %define LESSWRITEOPS ;------- %define UTF8 ;for UTF8 console or xterm e.g. @ Suse 9.1 +%define UTF8RTS ;runtime detection of UTF8 console display ;------- %define BEEP_IN_VI ;undef if you hate beeping computers %define USE_MATH ;undef if you don't use the numerics @@ -26,9 +27,23 @@ ; ; D O N O T C H A N G E B E L O W L I N E ;---------------------------------------------------------------------- +%ifndef LINUX + %undef UTF8 +%endif + +%ifndef UTF8 + %undef UTF8RTS +%endif + +%ifdef NETBSD +%define FREEBSD +%endif %ifdef OPENBSD %define FREEBSD %endif +; +;beware of SYS_... constants > 255! (see NetBSD) +; %ifdef BEOS ;posix/termios.h ;termios eq termio %define TERMIOS_SET 8001h ;TCSETA @@ -252,12 +267,13 @@ db "R/O file system",10 ;30 %define NCCS 19 %define VMIN 6 ;------- +%ifndef AMD64 ;asm/stat.h %define UIDGID_WORD struc stat_struc .st_dev: resd 1 -.st_ino: resd 1 -.st_mode: resw 1 +.st_ino: resd 1 ;unsigned long st_ino; +.st_mode: resw 1 ;unsigned short st_mode; .st_nlink: resw 1 .st_uid: resw 1 .st_gid: resw 1 @@ -292,15 +308,67 @@ db "R/O file system",10 ;30 %define SYS_ioctl 54 %define SYS_dup2 63 %define SYS_sigaction 67 +%define SYS_rt_sigaction 174 %define SYS_readlink 85 %define SYS_fchmod 94 %define SYS_fchown 95 %define SYS_fstat 108 %define SYS_wait4 114 %define SYS_select 142 - %ifndef ARMCPU %define time_t resd +%endif +%else ;;--------- AMD64 + struc stat_struc +.st_dev: resq 1 +.st_ino: resq 1 +.st_nlink: resq 1 +.st_mode: resd 1 +.st_uid: resd 1 +.st_gid: resd 1 +.__unused0: resd 1 +.st_rdev: resq 1 +.st_size: resq 1 +.st_blksize: resq 1 +.st_blocks: resq 1 +.st_atime: resq 1 +.__unused1: resq 1 +.st_mtime: resq 1 +.__unused2: resq 1 +.st_ctime: resq 1 +.__unused3: resq 1 +.__unused4: resq 1 +.__unused5: resq 1 + endstruc +%define SYS_exit 60 +%define SYS_fork 57 +%define SYS_read 0 +%define SYS_write 1 +%define SYS_open 2 +%define SYS_close 3 +%define SYS_unlink 87 +%define SYS_execve 59 +%define SYS_lseek 8 +%define SYS_utime 132 ;30 +%define SYS_kill 62 +%define SYS_rename 82 +%define SYS_pipe 22 +%define SYS_brk 12 +%define SYS_ioctl 16 +%define SYS_dup2 33 +%define SYS_rt_sigaction 13 +%define SYS_rt_sigreturn 15 +%define SYS_readlink 89 +%define SYS_fchmod 91 +%define SYS_fchown 93 +%define SYS_fstat 5 +%define SYS_wait4 61 +%define SYS_select 23 ;142 + +%define time_t resq +%endif + +%ifndef ARMCPU struc utimbuf_struc .actime: time_t 1 .modtime:time_t 1 @@ -322,8 +390,11 @@ db "R/O file system",10 ;30 ;no more support of CURSORMGNT for UTF-8 thus replaced by: ;8.Juni 2004: see /usr/src/linux/Documentation/VGA-softcursor.txt %else - %define CURSORMGNT ;switch cursor depending of 'INSERT'-mode + %define CURSORMGNT ;trad style + %ifdef AMD64 + %undef CURSORMGNT ;work around January 2006 + %endif %endif ;-------- @@ -388,11 +459,12 @@ db "Broken pipe",10 ;32 %endmacro %ifdef LIBC extern open,read,write,close,lseek,rename,_exit,ioctl,fstat,fchown,select,unlink,fchmod - extern errno + extern _errno %undef SYS_readlink %undef SYS_brk %undef SYS_kill %undef SYS_sigaction + %undef SYS_rt_sigaction %undef USE_PIPE %endif %ifdef ARMCPU @@ -420,11 +492,17 @@ db "Broken pipe",10 ;32 %define ECHO 0x8 %define TSize word ;due oversized ICANON ;------ + struc stat_struc .st_dev: resd 1 .st_ino: resd 1 -.st_mode: resw 1 -.st_nlink: resw 1 +%ifdef OPENBSD +.st_mode: resw 1 ;for syscall 279 +.st_nlink: resw 1 ;ditto +%else +.st_mode: resd 1 +.st_nlink: resd 1 +%endif .st_uid: resd 1 .st_gid: resd 1 .st_rdev: resd 1 @@ -441,6 +519,7 @@ db "Broken pipe",10 ;32 .st_gen: resd 1 .st_spare: resd 5 endstruc + %define SYS_exit 1 %define SYS_fork 2 %define SYS_read 3 @@ -449,24 +528,34 @@ db "Broken pipe",10 ;32 %define SYS_close 6 %define SYS_unlink 10 %define SYS_execve 59 -%define SYS_lseek 19 ;also 199 +%define SYS_lseek 199 ;old was 19 %define SYS_utime 138 -%ifndef OPENBSD %define SYS_kill 37 -%endif %define SYS_rename 128 %define SYS_pipe 42 %define SYS_ioctl 54 %define SYS_dup2 90 -%ifndef OPENBSD -%define SYS_sigaction 46 ;also 342 -%endif +%define SYS_sigaction 46 ;also 342 *** take care if >255 cause only register al used %define SYS_readlink 58 %define SYS_fchown 123 %define SYS_fchmod 124 -%define SYS_fstat 189 +%define SYS_fstat 279 ;old was 189 %define SYS_wait4 7 %define SYS_select 93 + +%ifdef OPENBSD +%undef SYS_kill +%undef SYS_sigaction +%undef SYS_fstat +%define SYS_fstat 189 ;could not test 292 +%endif + +%ifdef NETBSD +%undef SYS_kill ;both +%undef SYS_sigaction ;currently only for old COMPAT layer working +%endif + + %define time_t resd struc utimbuf_struc @@ -687,6 +776,7 @@ c_ospeed speed_t3 1 %undef CRIPLED_ELF %undef UTF8 %endif +;-------- ; stdtxtlen equ 10 ;do not move this to EOF: code size would increase @@ -784,9 +874,6 @@ phdr2: ;another Elf32_Phdr starts here ;------- %ifdef AMD64 -; %undef SYS_sigaction -; %undef SYS_kill - %macro PUSH_ALL 0 push rax push rbx diff --git a/contrib/e3.spec b/e3.spec index 8006a87..1481a1e 100644 --- a/contrib/e3.spec +++ b/e3.spec @@ -1,8 +1,8 @@ %define Name e3 -%define Version 2.31 +%define Version 2.7.0 %define Prefix /usr/local Name: e3 -Version: 2.31 +Version: 2.7.0 Release: 1 Group: System/Utilities Summary: e3 is tiny wordstar/emacs/pico/vi/nedit alike editor, well suited for rescue disks. @@ -10,7 +10,7 @@ Copyright: GPL Packager : Urs Rau <urs.rau@uk.om.org> #Conflicts: #Buildroot: /tmp/%{Name}-%{Version} -Provides: editor e3 e3-2.31 +Provides: editor e3 e3-2.7.0 Source: %{Name}-%{Version}.tar.gz %Description diff --git a/e3c/Makefile.mipsel b/e3c/Makefile.mipsel new file mode 100644 index 0000000..0369a48 --- /dev/null +++ b/e3c/Makefile.mipsel @@ -0,0 +1,42 @@ +# edit dest dir prefix if you want.... + + PREFIX='/' +# PREFIX=/boot/home +# (used /boot/home in BeOS) + +# LIBDIR='$(PREFIX)/lib' +INCDIR='/opt/mipsel/include' +INCDIR2='/opt/mipsel/lib/gcc-lib/mipsel-linux-uclibc/3.3.6/include' +LIBDIR='/var' +BINDIR='$(PREFIX)/bin' +MANSEC='1' +MANDIR='$(PREFIX)/man/man$(MANSEC)' + +#GCC='/opt/Embedix/tools/bin/arm-linux-gcc' +#STRIP='/opt/Embedix/tools/bin/arm-linux-strip' +GCC='mipsel-linux-uclibc-gcc' +STRIP=mipsel-linux-uclibc-strip + +##_____________________________________________________________ + +CTARGET=e3c +CSOURCES=e3.c +CFLAGS = -static-libgcc -DMAX_TEXTSIZE=102400 -w -Os -I$(INCDIR) -I$(INCDIR2) -nostdinc + +all: $(CTARGET) + + +$(CTARGET): $(CSOURCES) Makefile + $(GCC) $(CFLAGS) -DLIBDIR=\"$(PREFIX)/lib\" $(CSOURCES) -o $(CTARGET) + $(STRIP) -g $(CTARGET) + +list: $(CSOURCES) Makefile + $(GCC) $(CFLAGS) -Wa,-a -c -g -DLIBDIR=\"$(PREFIX)/lib\" $(CSOURCES) >e3c.list + +install: $(CTARGET) + install -d $(PREFIX) $(BINDIR) $(LIBDIR) $(MANDIR) + install -m 755 $(CTARGET) $(BINDIR) + install -m 644 e3ws.hlp $(LIBDIR) + install -m 644 e3.res $(LIBDIR) + install -m 644 $(CTARGET).man $(MANDIR)/$(CTARGET).$(MANSEC) + @@ -13,4 +13,10 @@ a combination of lex/yacc parser tools. Another hint: I have got some intersting success stories, for example linking against dietlibc getting small binaries. -See http://www.fefe.de/dietlibc/
\ No newline at end of file +See http://www.fefe.de/dietlibc/ + + +Last but not least: +Thanks to Christian Ostheimer for adaption to mipsel (fritz box fon). + +
\ No newline at end of file @@ -14,12 +14,16 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // +// adapted to mipsel (fritz box fon): 2005-08 C.O. (Christian Ostheimer) //--------------------------------------------------------------------- #ifndef __GNUC__ #error "Sorry, but I need GNU C." #endif +#ifndef MAX_TEXTSIZE + #define MAX_TEXTSIZE 10240000 // x86 pc +#endif #define CURSORMGNT #define LESSWRITEOPS #ifdef LESSWRITEOPS @@ -119,15 +123,18 @@ char asklineno[] ="^QI LINE:"; char optiontext[] ="OPT? C/B"; #define stdtxtlen 10 -char screencolors0[]={27,'[','4','0','m',27,'[','3','7','m'}; -char bold0[]={27,'[','0','m'}; // reset to b/w -char screencolors1[]={27,'[','4',/*'4'*/'1','m',27,'[','3','3','m'}; // yellow on red /*blue*/ -char bold1[]={27,'[','1','m',27,'[','7','m'}; // bold +char screencolors0[]={27,'[','4','0','m',27,'[','3','7','m',27,'[','0','m'}; +// pointer pbold0 instead of array bold0[] to avoid alignment issue on mipsel +// (content of bold0[] is now appended to screencolors0, C.O.) +char * pbold0=screencolors0 + 10; // reset to b/w; +char screencolors1[]={27,'[','4',/*'4'*/'1','m',27,'[','3','3','m',27,'[','1','m',27,'[','7','m'}; // yellow on red /*blue*/ +char * pbold1=screencolors1 + 10; // bold -#define reversevideoX bold1 // good for "linux" terminal on /dev/tty (but not xterm,kvt) +#define preversevideoX pbold1 // good for "linux" terminal on /dev/tty (but not xterm,kvt) #define scolorslen 14 #define boldlen 4 // take care length of bold0 == length of bold1 -#define O_WRONLY_CREAT_TRUNC 01101 +//#define O_WRONLY_CREAT_TRUNC 01101 +#define O_WRONLY_CREAT_TRUNC (O_WRONLY | O_CREAT | O_TRUNC) #define PERMS 0644 char resfile[]=LIBDIR"/e3.res"; @@ -213,7 +220,7 @@ unsigned char screenline [256+4*scolorslen]; // max possible columns + 4 color E unsigned char errmsgs [errbufsize]; //------ -#define max 10240000 +#define max MAX_TEXTSIZE unsigned char text [max]; #define sot (text+1) // start-of-text @@ -792,13 +799,13 @@ SetInverseStatus:PUSH(ecx); // returns zero flag goto SIS4; } inverse = 1; - esi = (long)&reversevideoX; + esi = (long)preversevideoX; esi+=revvoff; // switch between esc seq for linux or Xterm goto SIS2; SIS1: if (inverse-1) goto SIS3; inverse = 0; SIS6: isbold = 0; -SIS5: esi = (long)&bold0; +SIS5: esi = (long)pbold0; SIS2: ecx = boldlen; do { *(unsigned char*)edi++=*(unsigned char*)esi++; @@ -814,7 +821,7 @@ SetColor:PUSH(ecx); // expects extra-flag:bold else normal if (!extra) goto SCEsc1; if (isbold==1) goto SIS4; // never set bold if it is already bold isbold = 1; -SCEsc2: esi = (long)&bold1; +SCEsc2: esi = (long)pbold1; goto SIS2; SCEsc1: if (!isbold) goto SIS4; // ditto goto SIS6; diff --git a/tests/e3test0 b/tests/e3test0 deleted file mode 100644 index b08ba77..0000000 --- a/tests/e3test0 +++ /dev/null @@ -1,4 +0,0 @@ -RThis is a testfile for e3/Linux! -A text is written, deleted and undone - -
\ No newline at end of file |