Schievels software archeology 1 – Boxes

A series for ancient software pearls

I recently started with fixing bugs for clang16 in Gentoos packages. By default, Clang-16 will not allow implicit integer return types, implicit function declarations etc.

Eventually GCC-14 will follow, and instead of just changing the CFLAGS to make those errors into warnings again, we try to write patches for the packages. This is because this is not only cosmetic, implicit functions can lead to runtime failures on some architectures while the program runs fine on other architectures.

This is quite a task, here you can read up about it. Currently Gentoo has more than 500 open bugs because of this.

But this post should not be mainly about fixing clang16 bugs. When fixing those bugs I mainly aim for the packages in Gentoo that have no maintainer because these are the ones that are fixed the least likely so I feel my help is needed the most here. Many of those packages are abandoned by upstream as well, last release was 10+ years ago. But every now and then I come across an ancient software pearl which has a long standing history, is still maintained or does really interesting things. Things that are done in a different (supposedly more user friendly) way today, which makes using those packages and looking at them interesting as well.

Therefore I would like to start as small series here, where I present an ancient program in every post when I come across such a pearl.

Boxes

First software pearl I came across was app-misc/boxes by Thomas Jensen, they also have a GitHub repository and Webpage. This thing was founded some time around 1999 and saw it’s last release on Sep. 22, 2022!

What it does is generating ascii-art boxes, hence the name, around a given string. Like this:

/**************************/
/* Different all twisty a */
/* of in maze are you,    */
/* passages little.       */
/**************************/

or this:

          ,
      /\^/`\
     | \/   |
     | |    |               SPRING IS IN THE AIR!              jgs
     \ \    /                                                _ _
      '\\//'                                               _{ ' }_
        ||                      joan stark                { `.!.` }
        ||                  <spunk1111@juno.com>          ',_/Y\_,'
        ||  ,                                               {_,_}
    |\  ||  |\                                                |
    | | ||  | |              ASCII ART GALLERY:             (\|  /)
    | | || / /      <http://www.geocities.com/SoHo/7373/>    \| //
     \ \||/ /                                                 |//
      `\\//`   \\   \./    \\ /     //    \\./   \\   //   \\ |/ /
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(The geocities link is sadly dead)
Boxes has a wide selection of ascii-art boxes to choose from. Now, the more artsy ones are nice, I have a nick for ascii-art, but not very useful to me. But the other ones are very good to split C-code into sections.
Boxes is especially great because it generates the box around an already existing string. So you don’t need to have the box in mind when writing comments, you can put them in afterwards. Secondly boxes not only generates those boxes, it also removes botched boxes and puts new ones around the string again. Say you have a nice box and you edit the text inside. The box will become broken. You can remove the broken box with boxes -r and put a new one in afterwards. This is a great feature, since removing such boxes manually is kind of tedious.

You can also integrate this into the editor of your choice. They have a dedicated page to that. There is also a boxes-modes for Emacs, of course, but I have not checked it out yet. I am quite happy with the two functions of adding a box and removing it again.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert