]> code.delx.au - gnu-emacs/blobdiff - src/xrdb.c
(regi-interpret): Use `mapc' rather than `mapcar'.
[gnu-emacs] / src / xrdb.c
index e51a774dc477d01764ba660396ad905ba8c2d808..79f1da81a413729e30ac1ec0da79e969b3b183d3 100644 (file)
@@ -1,11 +1,12 @@
 /* Deal with the X Resource Manager.
-   Copyright (C) 1990, 1993, 1994, 2000, 2001 Free Software Foundation.
+   Copyright (C) 1990, 1993, 1994, 2000, 2001, 2002, 2003, 2004,
+                 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -15,8 +16,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 /* Written by jla, 4/90 */
 
@@ -53,9 +54,7 @@ Boston, MA 02111-1307, USA.  */
 #include <X11/X.h>
 #include <X11/Xutil.h>
 #include <X11/Xresource.h>
-#ifdef VMS
-#include "vms-pwd.h"
-#else
+#ifdef HAVE_PWD_H
 #include <pwd.h>
 #endif
 #include <sys/stat.h>
@@ -89,6 +88,10 @@ extern char *get_system_name ();
 /* Make sure not to #include anything after these definitions.  Let's
    not step on anyone's prototypes.  */
 #ifdef emacs
+/* darwin.h may have already defined these.  */
+#undef malloc
+#undef realloc
+#undef free
 #define malloc xmalloc
 #define realloc xrealloc
 #define free xfree
@@ -312,7 +315,7 @@ gethomedir ()
     }
 
   if (ptr == NULL)
-    return "/";
+    return xstrdup ("/");
 
   copy = (char *) malloc (strlen (ptr) + 2);
   strcpy (copy, ptr);
@@ -323,13 +326,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 */
 }
 
@@ -527,7 +530,9 @@ x_load_resources (display, xrm_string, myname, myclass)
   XrmDatabase rdb;
   XrmDatabase db;
   char line[256];
+
   char *helv = "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1";
+
 #ifdef USE_MOTIF
   char *courier = "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1";
   extern Lisp_Object Vdouble_click_time;
@@ -812,3 +817,6 @@ main (argc, argv)
   XCloseDisplay (display);
 }
 #endif /* TESTRM */
+
+/* arch-tag: 37e6fbab-ed05-4363-9e76-6c4109ed511f
+   (do not change this comment) */