So the new jffs base is barely out for a day and the bug reports are already rolling in. I included a tiny cal program as a freebie, mostly so I could tinker with the ansi escape menu code on the jffs. But apparently it prints out bogus calendars, and doesn't even support the vital -m switch to start the metric week off properly on a Monday! We can't have that.
Actually I was just starting to pull together the various bits needed for the alarm clock portions of my planned internet clock radio package when dronz filed his bug report. So I suppose I should probably attempt to fix the calendar first. Darn it! I took a longer look at the code and discovered some obvious problems. I'm pretty sure January usually has 31 days, not 21. Even after that fix all the days were still off by 1. Was time counted differently way back before y2k when this code was probably written? I can't remember, so maybe it was.
Anyhow, I hacked in the -m setting and fixed enough math errors to get past the end of 2012. According to the Mayans, the world's supposed to end in 2012 so that's probably good enough. Right?
flipclock they've got on the maemo. The source is mostly SDL, with a tiny helping of gtk for the alarm sound file selector dialog. Fortunately the ben nanonote has a tiny fileselector program from the jlime distro that's written in SDL and could work as a replacement for the gtk. It took a while to get it working because of the uclibc dirclose() segfault that I worked around for sdlbasic, and then promptly forgot about. It's still there in the IZ2S uclibc though, so I'm sure it'll get me again.
jlime fileselector works pretty well now in IZ2S, but it's a bit large for the jffs because it requires a truetype font and all the bloatware that goes along with that. I did some searching and discovered the SamyGo folks may have written an SDL_ttf replacement that uses a tiny linux console font instead of truetype fonts. I couldn't locate the code but I may make a go of that myself, especially with all my recent console font file experience. I also noticed gnurobbo has a compiler setting to use pixmap fonts instead of SDL_tty, so I might just take a peek at that as well.
If I do manage to produce a substitute lib using the console font I'll probably try to build a mini version of the dgClock program from a previous blog post. It weighs in at only 18K if I can ditch the 1MB required for SDL_ttf and libfreetype. It's also quite a bit prettier than the cal program, but I don't know if it has a setting to display the metric version of the calendar.
Here's an updated cal program, with source code so you can fix the math yourself in 2013, if that ever happens.
Here's the smaller shared lib ttyclock executable and a few alarm scripts to cull for ideas.