Subject: PlacementOverlapPenalities not working

From: Tim Phipps <[email-masked]>
Date: Mon, 21 Jan 2002 10:58:59 +0000

Configuration Information [Automatically generated, do not change]:
uname output: SunOS silver 5.5.1 Generic_103640-38 sun4u sparc SUNW,Ultra-5_10
Compiler: gcc
Compilation CFLAGS: -g -O2 -Wall -Wno-implicit-int
prefix: /u/phippst/sunos

FVWM Version:	2.5.0
FVWM_MODULEDIR:	/u/phippst/sunos/libexec/fvwm/2.5.0
FVWM_DATADIR:	/u/phippst/sunos/share/fvwm
FVWM_USERDIR:	/u/phippst/.fvwm

Description:
	The PlacementOverlapPenalities style doesn't work for me,
	whatever I try I get:
	
[FVWM][CMD_Style]: <<ERROR>> Bad style option: PlacementOverlapPenalities

	The man page states that up to six positive or null decimal
	arguments may be used but the code has this (style.c):
	
float f[6] = {-1, -1, -1, -1, -1, -1};
Bool bad = False;

found = True;
num = 0;
if (rest != NULL)
{
  num = sscanf(rest, "%f %f %f %f %f %f",
               &f[0], &f[1], &f[2], &f[3], &f[4], &f[5]);
  for(i=0; i < num; i++)
  {
    if (f[i] < 0)
      bad = True;
  }
}
if (bad)
{
  fvwm_msg(ERR, "CMD_Style",
           "Bad argument to PlacementOverlapPenalties: %s", rest);
  break;
}	

Repeat-By:
	
Style * PlacementOverlapPenalities 1 10 0 1 0.5 10

--
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-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 21 Jan 2002 12:35:18 +0100

>            "Bad argument to PlacementOverlapPenalties: %s", rest);

Works fine for me, at least if I correct the typo in the style

> Style * PlacementOverlapPenalities 1 10 0 1 0.5 10
                              ^^^

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Tim Phipps <[email-masked]>
Date: Mon, 21 Jan 2002 11:43:26 +0000

>>Style * PlacementOverlapPenalities 1 10 0 1 0.5 10

Works for me too, sorry about that.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 21 Jan 2002 12:44:04 +0100

> > Style * PlacementOverlapPenalities 1 10 0 1 0.5 10

Hm, that doesn't explain the error message you get.  BTW, is there
a specific reason why negative penalties are not allowed?

Bye

Dominik ^_^  ^_^

---

From: Tim Phipps <[email-masked]>
Date: Mon, 21 Jan 2002 11:49:41 +0000

> a specific reason why negative penalties are not allowed?

It does, the error has gone away and it now does what I want. I'm not 
sure what you'd want negative penalties to do, you can have 0 to ignore 
certain types altogether and you can have large numbers to avoid certain 
types altogether.

Cheers,
Tim.