AMIGA alive

AMIGA alive

Sunday, June 26, 2022

AADevLog #4 - AROS and AmigaOS text editor

Publishing zx81paint on AmiNet led to me reviewing a lot of old C code, and creating an ASCII text editor is certainly an essential project for every C coder.

Actually it started a long time ago: In the late nineties, I was impressed by text editors like Microsoft's "Frontpage" and some MacOS programs, which were among the first to show "tabbed" documents, have integrated shell functions (e.g. recursive search), and some other features I hadn't seen before in GUI text editors. So my idea of a program called "proWEB" was born, an HTML editor with advanced functions like sophisticated TABLE creation, FRAME management, etc. Well, time has passed, web development has changed, my preferences have changed, operating systems have changed, and so on. But the idea of a great text editor, according to my personal taste, has remained. In it's first early incarnation for AmigaOS, "proWEB" didn't really get far. There was a second incarnation for AROS which got considerably further, but I was a bit over-ambitious, and under-educated in software architecture, so that one slowly but steadily came to a halt, too. 

Nowadays, having created a lot of smaller programs, slowly developing a usable concept of a program's architecture, and with some experience with C compilers (vbcc is my favourite) gained, I resurrected this old project again.

Among the first steps of resurrection was to find a nice short name you can easily type into your shell - so now "proWEB" has become: "reED", preferably spoken (and certainly typed in as) "reed", which is a reference to a) my name, b) editing, and c) Phragmites Australis. :-)

To my surprise it took me just a day to make all code adjustments from AROS' gcc to AmigaOS' vbcc, including lots of stylistic improvements, and I got a working executable. The code now doesn't use any special compiler features, and should work with gcc, probably SAS-C, etc. just as it does with vbcc. There were a couple of minor differences between AmigaOS and AROS that needed to be taken care of - for example my old AROS system used a font called "ttcourier" instead of "courier".

"reED" running on AmigaOS3.9 in 2022!

Looking at this old code from my "modern" perspective, it's quite a mess, a lot of things can be done much simpler. But "reED" is more sophisticated than I remembered: It has it's own GUI layout engine, it has a massive menu (which I use more like a notepad, many functions not yet implemented), uses ASL file requesters, it can edit multiple documents, it can mark/cut/copy/paste - and it has actual tabs with keyboard control! Colors might be a bit harsh, though. ;-)

I'm not sure if it makes any sense to devote lots of energy to this project - but it's a sort-of success even at the current stage of development. AmigaOS is great, AROS is great, and why not support both at the same time, it's really easy. (Well, gcc will do, but we still need an updated vbcc for AROS to make it perfect.) And in the end, AROS is just AmigaOS, so it just makes a lot of sense.

Let's see what other old (or new) stuff I can dig out from my harddrive... there are a couple of games I have to seriously review and rework...

Thanks for reading, stay healthy!

* * *

Click here for an overview of all AADevLog articles

No comments:

Post a Comment