Embarassing Bug in Tile Module

Geoff Burling (llywrch@agora.rdrop.com)
Tue, 11 Dec 2001 14:42:08 -0800 (PST)

While I was reviewing the man pages for AfterStep, I found the
following inconsistency.

The man page provides this example for how to use the Tile module:

> This invocation will horizontally tile windows with a bounding box which
> starts at 10 by 10 percent into and down the screen and ends at 90 by 90
> percent into and down the screen.  Tile -h 10 10 90 90

But when I tried the example at a prompt, this is what was returned:

[geoff@joan AfterStep]$ Tile -h 10 10 90 90
Tile [--version] [--help] [-u] [-t] [-a] [-r] [-m] [-s] [-noraise]
     [-desk] [-flatx] [-flaty] [-resize] [-nostretch] [-incx value]
     [-incy value] [xoffset yoffset maxwidth maxheight]

Hmm. Not good, & what is worse, no one has ever used this module.
(Otherwise someone would have pointed this out.)

A quick glance at Tile.c shows in main that first comes this code

>   for (i = 1; i < argc && *argv[i] == '-'; i++)
>   {
>     if (!strcmp (argv[i], "-h") || !strcmp (argv[i], "--help"))
>       usage ();
> . . .
>   }

then main() calls parse_args() -- where ``-h" is interpreted as

Since I'm not that sharp of a C coder, would someone like to submit
a fix?


The AfterStep Window Manager for X User's Mailing List