On Sat, Oct 26, 2002 at 01:21:23PM +0200, Marcus Lundblad wrote:
> I made a patch to implement the vector offset additions I suggested a
> while ago on the FVWM-list.
> 
> I followed the instructions on the web for CVS, I hope I did everything
> correct.
> 
> With this you can do for example:
> 
> ButtonStyle 2 5 [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL 
> PROTECTED] [EMAIL PROTECTED]
> 
> to get a button that is aligned with an absolute number of pixels from the
> border.
> With this it's also possible to get lines of double witdh by using offset
> of 1 pixel.

Okay, I have applied the patch with a few changes.

 - Fixed a core dump in fvwm.c (freed .xoff twice and never .yoff)
 - Split the Vector line parsing code into separate functions to
   reduce indentation depth.
 - For consistency with other commands and readability, the suffix
   'p' has to be added to the offset definition, for example

     [EMAIL PROTECTED]
         ^     ^

 - More verbose description in the man page.
 - Reindented and tabified some lines.
 - Added entries in NEWS and AUTHORS.

And a note about sscanf (from the sscanf man page on my Linux
box):  when the "%n" assignment is used, this may add 1 to the
return code on some systems but nothing on others.  Hence, this
code is not portable:

  n = sscanf(s, "%d%n", &x, &offset);
  if (n != 1)
  {
    /* errror */
  }

This is a better (i.e. portable) version:

  ...
  if (n < 1)
  ...

And yes, I know that this bug was in the code before your patch.  I
just mentioned it 

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to