What am I doing here? I'm on vacation. I think I'm
addicted. ;-)
Well, I came up with a rather twisted hack on the plane.
Despite removing some code duplication in the aewm goodies,
I still had some functions which had to have one prototype
for GTK+ and another for Xaw. So I decided to do something
like:
#ifdef XAW
typedef Widget GenericWidget;
#endif
#ifdef GTK
typedef GtkWidget *GenericWidget;
#endif
Then use GenericWidget in my prototype, and compile to two
different .o files. Amusingly enough, it worked. So now I
have just about all my common code in one file. Nice.
Since it looks like I haven't written about it before, I
will now rant about -ansi.
I like to make sure that my C
programs are all ANSI-correct, being a subscriber of (and
occasional ``good guy'' on) comp.lang.c. Unfortunately
-ansi
mucks with compilation in rather odd ways. It
undefines almost everything in features.h, which
would be find with me if I could simply turn
__USE_BSD back
on. However, -D__USE_BSD doesn't work at all.
#define __USE_BSD 1 randomly works and doesn't
work depending on what order I include things in, but I
wouldn't consider this a tenable solution anyway.
This means I
have no prototypes in scope for snprintf or
strcpy, thus implicitly defining them as returning
int and getting type coercion warnings. Note to
self: start searching gnu.gcc.bug archives...
And of course, anything in __USE_ISOC9X
should be included in
-ansi now. :-P
On to my other favorite source of suckage: X11. There's one
big problem that's stopping a 1.0 release, and that's
windows getting destroyed before we know about it. I will
elucidate with some stuff I just sent to craigbro:
Now in the sane case, there's an UnmapNotify at the head of
the queue,
and a DestroyNotify further down. So we can suck that event
off and
say "whoa, nellie!" to the code that was going to touch
that window.
But there's also the degenerate evil hose beast case,
brought to you
by none other that that wonderful toolkit GTK+. (Hey, I
don't mind
programming in it, but when i have my WM hat on I hate it.)
If you
kill a GTK+ window is some circumstances I haven't figured
out yet, it
destroys itself, puts an UnmapNotify on the queue, and then
*doesn't*
put the DestroyNotify on until we've already had a chance
to return
from XNextEvent, not find the DestroyNotify in the list of
pending
events, and go kablooie.
...Obviously, one could always make an X error handler
that does
nothing (er, guilty as charged), but i'm not letting that
evil kludge
spread any further.
The big problem here is that this is not only affecting the
WM itself, it's getting in the way of the next feature I
want to add to the *-palette goodies: keeping track of
iconification. We'll see. If anyone has a decent way of
implementing something like XIsWindowValid(), let me know.
Dialups: SSH over a dialup PPP link is slooooow. But then
everything seems slow; it's been almost 2 years since I had
to suck data through one of these.
Social Engineering: In case you were wondering, (yeah,
right), it's by grandfather's Windoze box that has the PPP
link. I accidentally erased the dial-up password (mumble
mumble Client For Microsoft Networks mumble), so I figured
I would take a guess before bothering him... got it on the
first try. Sheesh.
ObRandomThought: I need to have mutt not thread my inbox
and sent box, just my mailing list folders. Off to the
manuals...
And more software stuff: Redid the aewm Changelog. There's
another thing out of the way...
In good news, Photek's new LP is scheduled for September.
Dillinja, take a hint, eh? We heard Nasty Ways on dub last
summer! You're not freakin' Bad Co...