*** empty log message ***
[bpt/emacs.git] / src / xrdb.c
index 8306109..ed701c6 100644 (file)
@@ -1,5 +1,5 @@
 /* Deal with the X Resource Manager.
-   Copyright (C) 1990, 1993, 1994 Free Software Foundation.
+   Copyright (C) 1990, 1993, 1994, 2000, 2001 Free Software Foundation.
 
 This file is part of GNU Emacs.
 
@@ -33,12 +33,15 @@ Boston, MA 02111-1307, USA.  */
 #include <stdio.h>
 
 #if 1 /* I'd really appreciate it if this code could go away...  -JimB */
-/* this avoids lossage in the `dual-universe' headers on AT&T SysV X11 */
-#ifdef USG5
+/* This avoids lossage in the `dual-universe' headers on AT&T SysV
+   X11.  Don't do it on Solaris, because it breaks compilation with
+   XFree86 4.0.3 (and probably many other X11R6 releases) on Solaris
+   2 */
+#if defined(USG5) && !defined(SOLARIS2)
 #ifndef SYSV
 #define SYSV
 #endif
-#endif /* USG5 */
+#endif /* USG5 && !SOLARIS2 */
 
 #endif /* 1 */
 
@@ -320,13 +323,13 @@ gethomedir ()
 
 
 static int
-file_p (path)
-     char *path;
+file_p (filename)
+     char *filename;
 {
   struct stat status;
 
-  return (access (path, 4) == 0                        /* exists and is readable */
-         && stat (path, &status) == 0          /* get the status */
+  return (access (filename, 4) == 0             /* exists and is readable */
+         && stat (filename, &status) == 0      /* get the status */
          && (S_ISDIR (status.st_mode)) == 0);  /* not a directory */
 }
 
@@ -542,37 +545,37 @@ x_load_resources (display, xrm_string, myname, myclass)
      will use some other default font.  */
 #ifdef USE_MOTIF
 
-  sprintf (line, "%s.pane.background: grey75", myname);
+  sprintf (line, "%s.pane.background: grey75", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fontList: %s", myname, helv);
+  sprintf (line, "%s*fontList: %s", myclass, helv);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*menu*background: grey75", myname);
+  sprintf (line, "%s*menu*background: grey75", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*menubar*background: grey75", myname, helv);
+  sprintf (line, "%s*menubar*background: grey75", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*verticalScrollBar.background: grey75", myname);
+  sprintf (line, "%s*verticalScrollBar.background: grey75", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*verticalScrollBar.troughColor: grey75", myname);
+  sprintf (line, "%s*verticalScrollBar.troughColor: grey75", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s.dialog*.background: grey75", myname);
+  sprintf (line, "%s.dialog*.background: grey75", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb.Text.background: white", myname);
+  sprintf (line, "%s*fsb.Text.background: white", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb.FilterText.background: white", myname);
+  sprintf (line, "%s*fsb.FilterText.background: white", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb*DirList.background: white", myname);
+  sprintf (line, "%s*fsb*DirList.background: white", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb*ItemsList.background: white", myname);
+  sprintf (line, "%s*fsb*ItemsList.background: white", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb*background: grey75", myname);
+  sprintf (line, "%s*fsb*background: grey75", myclass);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb.Text.fontList: %s", myname, courier);
+  sprintf (line, "%s*fsb.Text.fontList: %s", myclass, courier);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb.FilterText.fontList: %s", myname, courier);
+  sprintf (line, "%s*fsb.FilterText.fontList: %s", myclass, courier);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb*ItemsList.fontList: %s", myname, courier);
+  sprintf (line, "%s*fsb*ItemsList.fontList: %s", myclass, courier);
   XrmPutLineResource (&rdb, line);
-  sprintf (line, "%s*fsb*DirList.fontList: %s", myname, courier);
+  sprintf (line, "%s*fsb*DirList.fontList: %s", myclass, courier);
   XrmPutLineResource (&rdb, line);
 
   /* Set double click time of list boxes in the file selection
@@ -580,10 +583,10 @@ x_load_resources (display, xrm_string, myname, myclass)
   if (INTEGERP (Vdouble_click_time) && XINT (Vdouble_click_time) > 0)
     {
       sprintf (line, "%s*fsb*DirList.doubleClickInterval: %d",
-              myname, XFASTINT (Vdouble_click_time));
+              myclass, XFASTINT (Vdouble_click_time));
       XrmPutLineResource (&rdb, line);
       sprintf (line, "%s*fsb*ItemsList.doubleClickInterval: %d",
-              myname, XFASTINT (Vdouble_click_time));
+              myclass, XFASTINT (Vdouble_click_time));
       XrmPutLineResource (&rdb, line);
     }
 
@@ -809,3 +812,6 @@ main (argc, argv)
   XCloseDisplay (display);
 }
 #endif /* TESTRM */
+
+/* arch-tag: 37e6fbab-ed05-4363-9e76-6c4109ed511f
+   (do not change this comment) */