o [I move this discussion to fvwm-workers@ not to scare readers.] Missed which list we were on. Thanks.
o This is a good suggestion, but it adds more than 300 events to modules o even if they are not interested in window flag bits. That's true, although 300 events on startup isn't so bad. I'm not sure how often people ask for config info after that, though, so it is possible that it adds a lot of overhead to some modules. o I am not against going this way although it is harder than my my o intermediate solution and still is not fully the ideal solution (that o would be not to dump and pass C structures across network). But again, o this is an acceptable solution. I go back and forth about this. On the one hand, dumping the C structure is the most efficient way to take care of shipping this kind of data. On the other hand, my platform-independant psyche says "yech." I like the idea of adding a new message, but only if it is heading toward a permanent solution. What're you thinking about as an alternative to shipping the C structure? I mean, I can think of a few, but they seem so grossly inefficient (either in terms of space or computational overhead). I'd like to think about this in the context of where this code is going, rather than just the intermediate solution. o But then, to be optimal we need a new event type MX_WINDOW_FLAG with o three arguments: short int bit_start, short int bit_length, char o *name. Again, your experience wins out. I hadn't used any multi-bit flags. This will complicate the code, below. Not much, though. -- Sal smile. o o > The C code is the same as what Mark has been talked about for a C -> Perl o > module, and I've written it already for another project, although it's not o > to Fvwm coding standards. It's not elegant, but brute force is all we can o > get because of the implementation-dependent style of the C standard. o > o > #define FIND_BIT(x) \ o > { SET_##x(with,1); \ o > find_bit(##x,with,without); \ o > SET_##x(with,0); } o > o > unsigned find_bit(char * name, o > window_flags * with, o > window_flags * without) o > { o > for (i = 0; i < (sizeof(wf) * 8); ++i) o > { o > unsigned bitIndex = i % 8; o > unsigned byteIndex = i / 8; o > unsigned char byte = ((unsigned char *)&wf)[byteIndex]; o > unsigned char bit = (byte >> bitIndex) & 0x1; o > unsigned char bytet = ((unsigned char *)&wft)[byteIndex]; o > unsigned char bitt = (bytet >> bitIndex) & 0x1; o > if (bit != bitt) o > printf("M_CONFIG_INFO FlagBit %s %d\n",name,bit); o > } o > } o > o > unsigned dump_window_flags() o > { o > FvwmWindow with; o > FvwmWindow without; o > FIND_BIT(DO_SHRINK_WINDOWSHADE); o > FIND_BIT(DO_LOWER_TRANSIENT); o > FIND_BIT(DO_STACK_TRANSIENT_PARENT); o > o > ... o > o > } o o Regards, o Mikhael. o o o -------------- Salvatore Domenick Desiano Research Scientist NASA Ames Research Center (QSS Group, Inc.) -- 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]