October 24, 2009

Back to where I started

I removed or commented out most of the tainted code and re-wrote a lot of them, and the system is working about the same as before the branch. I still need to implement the low-level filesystem functions and vfork()/execv() functions to make a working Punix File System.

I also took the liberty of improving the tty driver. Previously this was based on crufty old code from V6 and V7, and it didn't support modern terminal standards and conventions. This code did most of the work in the ttyread() routine, where it handled the extra processing capabilites and end-of-line/end-of-file conditions. This code had a number of deficiencies, and I've been eager to rewrite it for some time now. I rewrote the tty based on code from 4.4BSD-Lite, where most of the work is done in the ttyinput() routine. This new version makes a line available in the canonical queue only when a "break" character is encountered (a break character is one of EOF (^D), EOL (\n), or EOT (also ^D)).

I also improved the virtual terminal driver by adding status indicators in the bottom-right corner of the screen for the Shift, 2nd, Diamond, Hand/Alpha, and Caps Lock modifiers. I drew a bitmap for a "bell" indicator too, but I haven't added it to the code yet.I added support for a bell indicator and started adding support for scroll lock. This can be seen in r160.

Speaking of modifiers, I really don't know what the "Hand" modifier should be used for in Punix. Maybe it could be scroll lock? Perhaps I could use it for the Compose feature instead of using the Mode key. Any ideas?

October 20, 2009

Some bad news

First of all, I want everyone to know that I'm still working on Punix, just at a near-glacial pace.

Secondly, several months ago I decided to clean up the license issue in Punix. The issue is that I'm releasing Punix under the GNU GPLv2—both by my own choice and because I'm using bits of code that are already under the GPLv2 (mostly from PedroM)—but some code is derived from UNIX V6, V7, or 2.11BSD. These latter ancient systems were released a few years ago by Caldera under an 4-clause BSD license. This license has an "advertising clause" which makes it incompatible with the GPL because it adds further restrictions to redistribution that are not allowed under the GPL.

So now I want to remove any "tainted" code. I performed a code audit on each and every function in each source file to determine whether the code was tainted or was ok to leave in Punix. Here are the files that have tainted code in them:

  • alloc.c
  • bio.c
  • fio.c
  • inode.c
  • namei.c
  • pipe.c
  • rdwri.c
  • tty.c

Unfortunately, this covers a lot of code that implements the buffer system and virtual file system (VFS). On the other hand, it's not very unfortunate because I hadn't fully integrated the VFS code yet anyway. Some of it didn't support modern UNIX standards and conventions either, and I was planning to rewrite it too.

All in all, this is only a minor setback. I have several files of code to re-implement to get a (somewhat) working system. I created a branch named "clean" for working on removing the "dirty" code. It doesn't compile as of r144, but I hope to fix that soon. :)