Subject: FVWM: patch to Read (fvwm-2.0.45; fvwm/read.c)

From: "Jacob Morzinski" <[email-masked]>
Date: Tue, 19 Aug 1997 02:27:33 EDT

The Read functions in fvwm-2.0.45 has behavior that I find very
annoying; in a multi-user setup, it expects the *system-wide* RC file
to be named ".fvwm2rc", instead of "system.fvwm2rc", and complains
loudly if it can't find a file of that name.

(e.g, it says:
    [FVWM][Read]: <<ERROR>> file '.fvwm2rc' not found in $HOME or /mit/windowmanagers/arch/sun4m_54/lib/X11/fvwm2
    [FVWM][Read]:  trying to read system rc file
)

This is inconsistent with the behavior of all traditional
windowmanagers that I am familiar with.  I modified the function
to cease emitting the warning messages.

Patch included.

Sincerely,
-- 
 Jacob Morzinski                                [email-masked]

--- fvwm/read.c	1997/06/01 01:55:22	1.2
+++ fvwm/read.c	1997/06/24 06:03:41	1.3
@@ -117,10 +117,19 @@
 
   if(fd == NULL)
   {
-    fvwm_msg(ERR,
-             piperead?"PipeRead":"Read",
-             piperead?"command '%s' not run":"file '%s' not found in $HOME or "FVWMDIR,
-             ofilename);
+    if( ! (	/* Complain if this is _not_ the .fvwm2rc file, the 0th time */
+#ifdef FVWMRC
+       (strcmp(ofilename,FVWMRC) == 0)
+#else
+       (strcmp(ofilename,".fvwm2rc") == 0)
+#endif
+       && (thisfileno == 0)) )
+    {
+      fvwm_msg(ERR,
+	       piperead?"PipeRead":"Read",
+	       piperead?"command '%s' not run":"file '%s' not found in $HOME or "FVWMDIR,
+	       ofilename);
+    }
     if((ofilename != filename)&&(filename != NULL))
     {
       free(filename);
@@ -185,7 +194,7 @@
 
   if (last_read_failed && this_read == 0)
   {
-    fvwm_msg(INFO,"Read","trying to read system rc file");
+/*    fvwm_msg(INFO,"Read","trying to read system rc file"); */
     ExecuteFunction(read_system_rc_cmd,NULL,&Event,C_ROOT,-1);
   }
 
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].