Subject: Vikas Agnihotri: Re: FVWM: send_configinfo error

From: Dan Espen <[email-masked]>
Date: Tue, 19 Jan 1999 08:53:12 -0500

In offline discussions with Vikas, his problem was resolved.
He reported the command table out of sequence, and in another mail
he said it was 2.1.7.

I don't see this is 2.1.7, but I think the important thing is
his problem is resolved, and our current command table is in
sequence.

Date: Mon, 18 Jan 1999 16:08:45 -0500
From: Vikas Agnihotri <[email-masked]>
To: Dan Espen <[email-masked]>
Subject: Re: FVWM: send_configinfo error

On Mon, Jan 18, 1999 at 03:30:22PM -0500, Vikas Agnihotri wrote:

> Well, I just downloaded the latest source tarball from
> fvwm.math.uh.edu and compiled it. I still get the same error.

Hmm.. the commmand list in functions.s was not exactly in sorted
order. The following patch worked for me. I dont get the errors I was
getting earlier.

FWIW, this is a really silly restriction (Sorted list). Many people
hacking on the code would make this easy to break. Why not simply
'qsort' the list before using it in the code? This way, it doesnt
matter what order the 'char *keyword' elements are in. Whatever.

--- functions.c	Sat Jan  2 21:08:47 1999
+++ /export/home/vikas/functions.c	Mon Jan 18 16:03:06 1999
@@ -146,12 +146,12 @@ static struct functions func_config[] =
   {"Resize",       resize_window,    F_RESIZE,              FUNC_NEEDS_WINDOW},
   {"Restart",      restart_function, F_RESTART,             FUNC_NO_WINDOW},
   {"Scroll",       scroll,           F_SCROLL,              FUNC_NO_WINDOW},
+  {"SendToModule", SendStrToModule,  F_SEND_STRING,         FUNC_NO_WINDOW},
   {"Send_ConfigInfo",SendDataToModule, F_CONFIG_LIST,       FUNC_NO_WINDOW},
   {"Send_WindowList",send_list_func, F_SEND_WINDOW_LIST,    FUNC_NO_WINDOW},
-  {"SendToModule", SendStrToModule,  F_SEND_STRING,         FUNC_NO_WINDOW},
-  {"set_mask",     set_mask_function,F_SET_MASK,            FUNC_NO_WINDOW},
   {"SetAnimation", set_animation,    F_SET_ANIMATION,	    FUNC_NO_WINDOW},
   {"SetEnv",       SetEnv,           F_SETENV,              FUNC_NO_WINDOW},
+  {"set_mask",     set_mask_function,F_SET_MASK,            FUNC_NO_WINDOW},
   {"SnapAttraction",SetSnapAttraction,F_SNAP_ATT,           FUNC_NO_WINDOW},
   {"SnapGrid",     SetSnapGrid,      F_SNAP_GRID,           FUNC_NO_WINDOW},
   {"Stick",        stick_function,   F_STICK,               FUNC_NEEDS_WINDOW},

Feel free to submit it to the appropriate developers.

Thanks for your help,

Vikas
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
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: Tue, 19 Jan 1999 20:26:29 +0100

> his problem is resolved, and our current command table is in

Seems like CygWin has a different notion about what the proper
character order should be :(

Bye

Dominik

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Tue, 19 Jan 1999 15:31:29 -0500

> character order should be :(

I guess I didn't look close enough to see that.

Looking even closer, the problem only occurs with underscore,
a really unfortunate character to pick when doing case-less
compares as it sits right between the upper and lower case
characters.  The ascii sequence is A-Z,_,a-z.

We have the table in an  order that would  imply that underscore comes
before uppercase letters but of course it comes after.
We binary search the table using "strcasecmp", I suppose assuming
that strcasecmp treats letters as lowercase.  My Solaris man page
gives no such guarantee.

It looks like every UNIX that fvwm2 runs on implements strcasecmp
in lowercase.  CygWin has taken a different path.

I favor fixing this as follows:

Change the table contents to all upper or lowercase.
Before doing the search, change the input command to the same
case as the table.
During the bsearch do strcmp or strncmp.

I DON'T see this as a 2.2 candidate, but I don't use
CygWin either.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
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: [email-masked] (Paul D. Smith)
Date: 19 Jan 1999 16:24:28 -0500

%% Dan Espen <[email-masked]> writes:

  de> I favor fixing this as follows:

  de> Change the table contents to all upper or lowercase.
  de> Before doing the search, change the input command to the same
  de> case as the table.
  de> During the bsearch do strcmp or strncmp.

  de> I DON'T see this as a 2.2 candidate, but I don't use
  de> CygWin either.

Definitely not.

Remember we can always release bugfixes if they're critical (obviously
we should strive to avoid this and only do really important ones) so if
we get a flood of cygwin complaints we could make this change in 2.2.1
or whatever.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
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].