taviso / 123elf Goto Github PK
View Code? Open in Web Editor NEWA native port of Lotus 1-2-3 to Linux.
A native port of Lotus 1-2-3 to Linux.
Gentoo GNU/Linux (multilib), glibc-2.34
$ gdb -ex=r --args 123 -f unix -w $PWD/root/lotus/123.v10/smpfiles/income.wk3
GNU gdb (Gentoo 11.2 vanilla) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from 123...
Starting program: /home/random/git/123elf/123 -f unix -w /home/random/git/123elf/root/lotus/123.v10/smpfiles/income.wk3
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0xf7e6f3c2 in __fstatat64_time64 () from /lib/libc.so.6
(gdb) backtrace
#0 0xf7e6f3c2 in __fstatat64_time64 () from /lib/libc.so.6
#1 0xf7e6f11d in fstatat () from /lib/libc.so.6
#2 0xf7e6ee40 in stat () from /lib/libc.so.6
#3 0x0812eab2 in __unix_stat (pathname=0x8142fa6 "/home/random", statbuf=0xffffc074) at wrappers.c:126
#4 0x0811d12a in path_exists ()
#5 0x081107ee in config_init ()
#6 0x08111fe7 in main_init ()
#7 0x08111f8e in __unix_main ()
#8 0x0812e839 in main (argc=5, argv=0xffffc664, envp=0xffffc67c) at main.c:19
(gdb)
Also, I had to add -ltinfo
to get it to link against ncurses 6.3:
diff --git a/Makefile b/Makefile
index 6ccea31..d3b93d0 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ OBJCOPY_FLAGS = --wildcard --localize-symbols=localize.lst --globalize-symbols=
CFLAGS = -lc -m32 -ggdb3 -O0 -fno-stack-protector
ASFLAGS = --32
LDFLAGS = $(CFLAGS) -B. -Wl,-b,coff-i386 -no-pie
-LDLIBS = -lncurses
+LDLIBS = -lncurses -ltinfo
PATH := .:$(PATH)
define BFD_TARGET_ERROR
Hi
I've tried to build on
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
First build binutils with --prefix=/home/user/opt --enable-targets=all
And then
$ make
cc -m32 -ggdb3 -O0 -Wno-multichar -m32 -ggdb3 -O0 -Wno-multichar -B. -Wl,-b,coff-i386 coffsyrup.c -lncurses -o coffsyrup
./ld: cannot find -lncurses: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [<builtin>: coffsyrup] Error 1
Installing every ncurses* pkg with 32-bit versions didn't help
# dpkg -l | grep curses | awk '{print $2}'
lib32ncurses6
libncurses-dev:amd64
libncurses5-dev:amd64
libncurses6:amd64
libncursesw5-dev:amd64
libncursesw6:amd64
mtr-tiny
ncurses-base
ncurses-bin
ncurses-term
pinentry-curses
Changing Makefile also didn't help
LDLIBS = -lncurses -L/usr/lib/x86_64-linux-gnu
$ make
cc -m32 -ggdb3 -O0 -Wno-multichar -m32 -ggdb3 -O0 -Wno-multichar -B. -Wl,-b,coff-i386 coffsyrup.c -lncurses -L/usr/lib/x86_64-linux-gnu -o coffsyrup
./ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libncurses.so.6 when searching for libncurses.so.6
./ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libncurses.so.6 when searching for libncurses.so.6
./ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libtinfo.so when searching for -ltinfo
./ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libtinfo.a when searching for -ltinfo
./ld: cannot find -ltinfo: No such file or directory
./ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libtinfo.so when searching for -ltinfo
./ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 when searching for libgcc_s.so.1
collect2: error: ld returned 1 exit status
make: *** [<builtin>: coffsyrup] Error 1
Even with
LDLIBS = -lncurses -L/usr/lib32
$ make
cc -m32 -ggdb3 -O0 -Wno-multichar -m32 -ggdb3 -O0 -Wno-multichar -B. -Wl,-b,coff-i386 coffsyrup.c -lncurses -L/usr/lib32 -o coffsyrup
./ld: cannot find -lncurses: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [<builtin>: coffsyrup] Error 1
I think we should make a .deb
/.rpm
, but how?
I think the main question is if it is okay to include a 123
binary, or should we include ld
and link it together in a script?
I think /File List Worksheet
doesn't seem to work?
It's hard to press some keys in some terminals, I've noticed F10 doesn't work in gnome-terminal.
I really need to figure out the keymap file format and make a utility that can edit it.
I think this is a slightly over-engineered file format that has a serialized n-ary tree of key sequences.
For example, PgUp might generate \e[6~
and → might generate \e[C
It could be stored like this:
\e
/\
[ Escape
/\
6 C
/\ \
~ ? Right
|
PgUp
This way you navigate the tree to figure out what the user just pressed.
Saving is unfortunately not possible for me /File Save Enter name of file to save: /home/foo/file0001.wk3
.
I get the following error message: Unable to reserve file: it is already reserved -- Press HELP
Unable to reserve file: it is already reserved
You selected /File Admin Reservation Get when someone else was using
the file with the reservation.
You can get the reservation if no one else has it and if the file
has not changed on disk since you read it into memory. Try again later
to get the reservation.
This will create an empty file /home/foo/file0001.wk3
.
To be on the safe side, I tried the following: /File Admin Reservation Release
and get this error message The worksheet file has no reservation -- Press HELP
.
The worksheet file has no reservation
The following conditions could have caused this error:
* You tried to save a file and you did not have the reservation. You must
have the reservation to save a file. Use /File Admin Reservation Get
to try to get the reservation.
* You tried to release the reservation with /File Admin Reservation
Release when you did not have the reservation. You are already
using a read-only file.
* You tried to save a worksheet file to a directory or disk file to which
you do not have write-privileges at the UNIX level. Change the
permissions with the UNIX chmod command and repeat the /File Save.
System: Ubuntu 22.04 64b
123elf version: 199b81f
Terminal: Konsole (same issue with xterm)
I made a successful binary using the provided scripts and makefile, but executing it just returns a "123: Cannot initialize system file configuration" error.
Trying to run it with gdb doesn't return any form of crash or error message, it terminates normally.
Maybe I skipped some configuration step, but the binary seems fine.
123 will start fine in a terminal window larger than 80x24. I normally run a 100x50 window and that is no problem at all. 100x80 also works well.
But when the window is larger, just slightly outside those dimensions, 123 fails on startup with the message "123: Memory full".
I'm not sure this can be changed, as we don't have the source code. But a note in the documentation would be helpful for those, like me, who run ridiculously large screens with ridiculously small fonts.
If the limit can be extended that would of course be even nicer. 123 runs perfectly fine in these larger terminal sizes otherwise.
I really can't understand from the instructions what to do.
I am running a Debian 11 system. The output of objdump --info | grep coff-i386
is blank. From this I assume I do not have a copy of binutils which supports coff-i386
.
So what should I do next?
I won't go into explaining what I tried to do because this will just confuse matters.
The original command line parser of Lotus 1-2-3 for UNIX supported deprecated and useless features, and there are some outdated options as following:
-f dos
: select a file-name mode to DOS-c
: select lower/upper-case dos file-name mode-n
: run without using a video displayMeanwhile, we might extend the command line parser to support new options such as --no-banner
/ --show-banner
(#28), --ignore-case
(file-name mode ignoring the case of the characters), and --enable-autoexec
/ --disable-autoexec
(#27).
These files cause a "segmentation fault":
wks-files.zip
This thing:
Lotus (R) 1-2-3 (R) for {OS}
Version {PVERSION}
This is a video describing the issue:
https://photos.app.goo.gl/xrRVaprVntwpuuoHA
I configured it in VT100 emulation
Lots of keys don't work properly (e.g. F1).
Figure out why.
Sometimes Lotus says "Error reading file" on startup. The error can be dismissed by pressing Enter, and it seems to work after that.
What file is it talking about?
Lotus 1-2-3 predates UTF-8, and uses LMBCS internally, which is sort of a precursor to unicode.
I see no reason we couldn't add a UTF-8 option for file/display charset, for better i18n support. It supports character set translation, we just have to teach it how and figure out the CBD (character bundle) format. I already know the BDLREC format, from my lotusdrv project - it's basically a TLV (tag, length, value) encoding system.
Running make
gave me multiple definition of 'ustat'
./ld: 123.o:ulimit.s:(.text+0xdfa0c): multiple definition of `ustat'
Adding ustat
to undefine.lst
allowed make
to complete.
Ubuntu 18.04
Hello!
Trying to compile on Ubuntu 20.04 using binutils-2.34 downloaded and compiled with i386-coff support. Getting the following:
objcopy -I coff-i386 -O coff-i386 --wildcard --localize-symbols=localize.lst --globalize-symbols=globalize.lst --redefine-syms=redefine.lst --weaken-symbols=weaken.lst orig/123.o 123.o
free(): double free detected in tcache 2
make: *** [Makefile:44: 123.o] Aborted (core dumped)
make: *** Deleting file '123.o'
I'm thinking this might be the result of the version of binutils I'm using? It's the same version as Ubuntu 20.04 gives me. Any ideas?
Thanks!
You can create a graph, but can't display it in the terminal yet -- port the driver from lotusdrv!
(more of a question for you related to your article on lotus123)
Not sure if this is the kind of code you are looking for a COFF object loader, I once wrote one based off a similar one we had working in good old sunos3.... All those codes are in the NEMO package in:
https://github.com/teuben/nemo/tree/master/src/kernel/loadobj
Hi, thank you for your amazing work!
I am trying to build on WSL / Debian 10 but got the following error:
cc forceplt.o -lc -m32 -ggdb3 -O0 -fno-stack-protector -lc -m32 -ggdb3 -O0 -fno-stack-protector -B. -Wl,-b,coff-i386 -no-pie 123.o dl_init.o main.o wrappers.o patch.o filemap.o graphics.o draw.o -Wl,--whole-archive,ttydraw/ttydraw.a,--no-whole-archive -o 123 -lncurses -ltinfo
./ld: forceplt.o: in function __require_ref': (.text+0x470): warning: the use of
tmpnam' is dangerous, better use mkstemp' ./ld: (.text+0x466): warning: the use of
tempnam' is dangerous, better use mkstemp' ./ld: 123.o:atoi.c:(.text+0xd9f9c): multiple definition of
getmsg'
./ld: 123.o:putchar.c:(.text+0xdc0a4): multiple definition of putmsg' ./ld: 123.o:setjmp.s:(.text+0xdd990): multiple definition of
stime'
collect2: error: ld returned 1 exit status
make: *** [Makefile:44: 123] Error 1
Thanks!
123
(built at 2b15de4) runs one core at 100%. stracing it shows it’s polling stdin for characters:
times({tms_utime=0, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 1721980973
ioctl(0, TCGETS, {c_iflags=0x4003, c_oflags=0x4, c_cflags=0xbf, c_lflags=0xa31, c_line=0, c_cc[VMIN]=0, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x00\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(0, TCGETS, {c_iflags=0x4003, c_oflags=0x4, c_cflags=0xbf, c_lflags=0xa31, c_line=0, c_cc[VMIN]=0, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x00\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(0, TCGETS, {c_iflags=0x4003, c_oflags=0x4, c_cflags=0xbf, c_lflags=0xa31, c_line=0, c_cc[VMIN]=0, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x00\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {c_iflags=0x4003, c_oflags=0x4, c_cflags=0xbf, c_lflags=0xa31, c_line=0, c_cc[VMIN]=0, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x00\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(0, TCGETS, {c_iflags=0x4003, c_oflags=0x4, c_cflags=0xbf, c_lflags=0xa31, c_line=0, c_cc[VMIN]=0, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x00\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(0, TCGETS, {c_iflags=0x4003, c_oflags=0x4, c_cflags=0xbf, c_lflags=0xa31, c_line=0, c_cc[VMIN]=0, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x00\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(0, TCGETS, {c_iflags=0x4003, c_oflags=0x4, c_cflags=0xbf, c_lflags=0xa31, c_line=0, c_cc[VMIN]=0, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x00\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
read(0, "", 1) = 0
continually shows up.
I’m using Debian 11 with XTerm 366.
/System is supposed to drop you to a command shell, useful for macros.
It almost works... sometimes, but not quite and the terminal messes up.
It would be nice to a have script that opens a bunch of worksheets and checks everything is working so that we're not scared we're breaking something with big changes.
Given all the specific dependencies (and the main repo size, for instance), may be providing an AppImage would a nice shortcut for those who want to try it out?
I'm not saying in any way that the instructions are limited or something, not at all -- I've built the package without any problems on Ubuntu 21.10. It's more like just a thought may be :)
In any case, thanks for bringing the memories back, really great work!
Ports to BSD variants should not be much more difficult than Linux.
Currently build fails on NetBSD:
cc -m32 -ggdb3 -O0 -fno-stack-protector -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -D_GNU_SOURCE -I ttydraw -c wrappers.c
wrappers.c: In function ‘__unix_ioctl’:
wrappers.c:62:14: error: ‘TCSETSW’ undeclared (first use in this function); did you mean ‘TC_TSS’?
case TCSETSW:
^~~~~~~
TC_TSS
wrappers.c:62:14: note: each undeclared identifier is reported only once for each function it appears in
wrappers.c:67:14: error: ‘TCSETS’ undeclared (first use in this function); did you mean ‘TCSETSW’?
case TCSETS:
^~~~~~
TCSETSW
wrappers.c:83:14: error: ‘TCGETS’ undeclared (first use in this function); did you mean ‘TCSETS’?
case TCGETS:
^~~~~~
TCSETS
wrappers.c: In function ‘__unix_readdir’:
wrappers.c:407:26: error: ‘struct dirent’ has no member named ‘d_off’
uent.d_off = lent->d_off;
^~
wrappers.c: At top level:
wrappers.c:419:1: error: unknown type name ‘sighandler_t’; did you mean ‘sa_handler’?
sighandler_t __unix_signal(int signum, sighandler_t handler)
^~~~~~~~~~~~
sa_handler
wrappers.c:419:40: error: unknown type name ‘sighandler_t’; did you mean ‘sa_handler’?
sighandler_t __unix_signal(int signum, sighandler_t handler)
^~~~~~~~~~~~
sa_handler
If you're trying to back out of several menus by pressing the escape key a few times, 1-2-3 seems very slow. It's actually just waiting a second to see if the Esc
is the first character in a sequence.
I think this timeout is too high for modern computers, this was probably written when you might using 123 over a lossy 2400 baud modem or something. In an xterm, we can make the timeout tiny.
Using commit 199b81f.
I ran git pull
, then make clean
and then make
, then copied the l123set file to my home directory before trying to run the program again.
Terminal size 80x24: Works fine
Terminal size 300x70 (zsh says it's an exit code 139):
-` jeff@archpad
.o+` ------------
`ooo/ OS: Arch Linux x86_64
`+oooo: Host: 20BWS0PJ00 ThinkPad T450s
`+oooooo: Kernel: 5.17.9-arch1-1
-+oooooo+: Uptime: 16 mins
`/:-:++oooo+: Packages: 626 (pacman)
`/++++/+++++++: Shell: zsh 5.9
`/++++++++++++++: Resolution: 1920x1080
`/+++ooooooooooooo/` WM: JWM
./ooosssso++osssssso+` Theme: Raleigh [GTK2/3]
.oossssso-````/ossssss+` Icons: Papirus [GTK2/3]
-osssssso. :ssssssso. Terminal: xterm
:osssssss/ osssso+++. CPU: Intel i7-5600U (4) @ 3.200GHz
/ossssssss/ +ssssooo/- GPU: Intel HD Graphics 5500
`/ossssso+/:- -:/+osssso+- Memory: 1173MiB / 11843MiB
`+sso+:-` `.-/+oso:
`++:. `-/+/
.` `/
jeff@archpad ~/builds/123elf (git)-[main] % ./123
[1] 5338 segmentation fault (core dumped) ./123
%
139 jeff@archpad ~/builds/123elf (git)-[main] % :(
Output from neofetch
is included in case it helps in some way.
Hi! I built binutils to support coff-i386, got all the dependencies lined up and compilation to succeed. I've gotten as far as:
[=D][josefcub@sinir 123elf]$ ./123
Segmentation fault (core dumped)
I noticed that some options do work:
[=P][josefcub@sinir 123elf]$ ./123 -h
Usage: 123 [optional argument]
Optional arguments are:
-f unix or -f dos to select a file-name mode
-c lower or -c upper to select lower-case dos file-name mode
or upper-case dos file-name mode
-k keyboard-type to select a particular keyboard type
-n to run without using a video display
-p number to select the number of sheets displayed
in perspective mode
-w filename to select a file to override the auto-file
(-n works as expected; the rest lead to a segfault). When I ran strace, I ended up with this:
openat(AT_FDCWD, "/proc/self/cwd/root/lotus/123.v10/cbd/l_ascii.bun", O_RDONLY) = 4
statx(4, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=2910, ...}) = 0
read(4, "\\\v]\0\f\4-\0\4\0\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"..., 2910) = 2910
close(4) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} ---
rt_sigaction(SIGSEGV, {sa_handler=SIG_DFL, sa_mask=[SEGV], sa_flags=SA_RESTART}, {sa_handler=0x811a438, sa_mask=[SEGV], sa_flags=SA_RESTART}, 8) = 0
getpid() = 31626
kill(31626, SIGSEGV) = 0
sigreturn({mask=[]}) = 24
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_USER, si_pid=31626, si_uid=1000} ---
+++ killed by SIGSEGV (core dumped) +++
I'm not much of a developer beyond being able to get this far, but I can provide other information (installed package versions, etc) if you need them. I did change my TERM variable around, and even ran it from the Linux console, to see if TCGETS was hitting it with something that Konsole was providing, but no dice.
I realize you're on Fedora, and I'm on something a little different, so I'm just reporting this in the spirit of 'this might break soon for more than just me'.
I've included the whole strace, in case it provides something I'm not seeing:
strace.txt
(The strace output differs here, probably due to 1>strace.txt 2>&1
)
Thank you for reading, and thanks for putting this really neat package together!
In extract.sh
, the find ... gunzip
step fails with
invalid compressed data--code out of range
for many files using gunzip
1.6 on Ubuntu 18.04. I tried a few other ways to extract the .z
files on my Linux machine, but the one that worked was using gunzip
272.250.1 on MacOS.
I would love to give this a test drive out of curiosity.
But it doesn't look easy for me to build this, or is it?
It would be great to have a Dockerfile
or docker image
so that running this would be super easy.
Maybe someone is already working on this?
binutils.sh fails, if the path to the directory contains a blank.
Example:
Compiling binutils in this directory fails:
/home/user/Documents/My Documents/123elf
Compiling binutils in this directory works for me (on the same system, Debian Bullseye 11):
/home/user/Documents/123elf
I had to install makeinfo
sudo apt install texinfo
before the binutils.sh
would complete. There was a failure during make
.
The script completed successfully after makeinfo
was installed.
Ubuntu 18.04
coffsyrup
cannot currently undefine local symbols, but there's no reason why it can't. The main problem is there are no relocs, so existing callers will still call the old function. There is an easy solution:
Now we provide a replacement, and the linker will just fix it up for us.
The print menus are there. I have a default printer. Its not able to spool a print job to it (or anywhere else) as fas I can tell. I could try setting up some text style old world 'lpr' printers perhaps. Print to File segmentation faults.
Tried compiling with the official instructions on Arch Linux and get this error when I run ./123:
123: setup file </home/ironveil/.l123set> damaged, please run setup123
Not sure what went wrong, even after a fresh recompile it still persists. I can add any more information if needed
MacOS cpio
doesn't have the -D
directory option so I used a relative reference in the command below.
When I did
cd root
for i in 123UNIX{2..5}.IMG; do
cpio -id < ../${i}
done
The lotus/123.v10/sysV386/lib/123.o.z_1
file (and others) extracted successfully, but 123.o.z_2
did not. I don't see any reason that this happens except that on Linux I get
lotus/123.v10/hlp/USA-English/123_sysV.hlp.z
cpio: warning: skipped 4798 bytes of junk
lotus/123.v10/sysV386/dvr/l13pepdt.dvr.z
lotus/123.v10/sysV386/lib/123.o.z_2
2510 blocks
lotus/123.v10/sysV386/bin/inst_dl.z
when I use -v
. On MacOS, I get skipped 4798 bytes...
and the _2
file isn't listed in the file names.
It seems surprising that Autoexec is enabled by default. I think this should be off by default, and users can enable it via /Worksheet Global Default Autoexec
.
I think modern users will be surprised that you have to enable undo (/Worksheet Global Default Other Undo Enable Update
).
Currently program doesn't start if not invoked from the code repo directory:
$ pwd
/
$ /tmp/123elf/123 -f unix -w "/tmp/123/root/lotus/123.v10/smpfiles/income.wk3"
123: can't access directory </proc/self/cwd/root/lotus/123.v10>, errno = 13
123: impossible d'acceder au repertoire </proc/self/cwd/root/lotus/123.v10>, erreur = 13
We should have a make install
script that will, roughly:
/usr/local/bin/123
(where user can change the /usr/local
prefix)/usr/local/man/man1/123.1
root/lotus/
into e.g. /usr/local/share/lotus/
, and the program should be able to find them thereIf you press F2
to edit a very long formula, then move around with the cursor keys, backspace and del don't always seem to work correctly. I think this is a termcap issue.
In 123R4 you can do @DATE(2022, 5, 22)
. 123 for UNIX only accepts two digit years, it seems to display okay (use /Range Format Date
), but I'm not sure if dates spanning Y2K will sort properly?
This can probably just be patched so that @DATE()
works.
I really need to make sure all the other functions are Y2K compliant 😆
I am using Ubuntu 20.04 and managed to compile it, however it segfaults right after the initial popup showing license information.
Compilation output:
$ make
cc forceplt.o -lc -m32 -ggdb3 -O0 -fno-stack-protector -lc -m32 -ggdb3 -O0 -fno-stack-protector -B. -Wl,-b,coff-i386 -no-pie 123.o dl_init.o main.o wrappers.o patch.o -o 123 -lncurses
./ld: forceplt.o: in function `__require_ref':
(.text+0x470): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
./ld: (.text+0x466): warning: the use of `tempnam' is dangerous, better use `mkstemp'
./ld: (.text+0x47a): warning: gtty is not implemented and will always fail
./ld: (.text+0x47f): warning: stty is not implemented and will always fail
123: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=284e6f6d00cb478dfe08fbabf732df59e61a4507, for GNU/Linux 3.2.0, with debug_info, not stripped
text data bss dec hex filename
943897 136840 41328 1122065 111f11 123
Copy l123set.cf to ~/.l123set and 1-2-3 should be ready!
GDB output:
Reading symbols from ./123...
(gdb) run
Starting program: ~/123elf/123
Program received signal SIGSEGV, Segmentation fault.
0x08127031 in getuid@GLIBC_2.0 ()
(gdb) bt
#0 0x08127031 in getuid@GLIBC_2.0 ()
#1 0x08112093 in __unix_main ()
#2 0x0812e987 in main (argc=1, argv=0xffffd5e4, envp=0xffffd5ec) at main.c:19
When using gdb it jumps straight into the SIGSEGV
.
I have tried to uncomment that syscall in redefine.lst
but then it crashes on another call:
Program received signal SIGSEGV, Segmentation fault.
0x08127031 in gets@GLIBC_2.0 ()
(gdb) bt
#0 0x08127031 in gets@GLIBC_2.0 ()
#1 0x0812e987 in main (argc=1, argv=0xffffd5e4, envp=0xffffd5ec) at main.c:19
Any ideas?
Add an option to disable the welcome banner on startup, it does sleep(5)
in banner_on()
which can be annoying.
banner_on()
is very simple and can just be rewritten, perhaps it should do getenv("LOTUS_NO_BANNER")
or something.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.