changeset 5204:912c34f1d7c8

(try to) fix g++ compilation problems -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-04-15 Ben Wing <ben@xemacs.org> * device-x.c (x_init_device): Don't declare something const if we're going to modify it. Clean up code to follow GNU coding standards.
author Ben Wing <ben@xemacs.org>
date Thu, 15 Apr 2010 20:13:25 -0500
parents 1c615eb1e4b2
children fcdb86afcb91
files src/ChangeLog src/device-x.c
diffstat 2 files changed, 22 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Apr 12 01:41:38 2010 -0500
+++ b/src/ChangeLog	Thu Apr 15 20:13:25 2010 -0500
@@ -1,3 +1,9 @@
+2010-04-15  Ben Wing  <ben@xemacs.org>
+
+	* device-x.c (x_init_device):
+	Don't declare something const if we're going to modify it.
+	Clean up code to follow GNU coding standards.
+
 2010-04-12  Ben Wing  <ben@xemacs.org>
 
 	* specifier.c (specifier_memory_usage):
--- a/src/device-x.c	Mon Apr 12 01:41:38 2010 -0500
+++ b/src/device-x.c	Thu Apr 15 20:13:25 2010 -0500
@@ -689,7 +689,7 @@
     Extbyte *path;
     const Extbyte *format;
     XrmDatabase db = XtDatabase (dpy); /* #### XtScreenDatabase(dpy) ? */
-    const Extbyte *locale = xstrdup (XrmLocaleOfDatabase (db));
+    Extbyte *locale = xstrdup (XrmLocaleOfDatabase (db));
     Extbyte *locale_end;
 
     if (STRINGP (Vx_app_defaults_directory) &&
@@ -720,28 +720,26 @@
     if (!access (path, R_OK))
       XrmCombineFileDatabase (path, &db, False);
 
-    if ((locale_end = strchr(locale, '.'))) {
-      *locale_end = '\0';
-      sprintf (path, format, data_dir, locale);
+    if ((locale_end = strchr (locale, '.')))
+      {
+	*locale_end = '\0';
+	sprintf (path, format, data_dir, locale);
 
-      if (!access (path, R_OK))
-	XrmCombineFileDatabase (path, &db, False);
-    }
+	if (!access (path, R_OK))
+	  XrmCombineFileDatabase (path, &db, False);
+      }
 
-    if ((locale_end = strchr(locale, '_'))) {
-      *locale_end = '\0';
-      sprintf (path, format, data_dir, locale);
+    if ((locale_end = strchr (locale, '_')))
+      {
+	*locale_end = '\0';
+	sprintf (path, format, data_dir, locale);
 
-      if (!access (path, R_OK))
-	XrmCombineFileDatabase (path, &db, False);
-    }
+	if (!access (path, R_OK))
+	  XrmCombineFileDatabase (path, &db, False);
+      }
 
   no_data_directory:
-    {
-      /* Cast off const for G++ 4.3. */
-      Extbyte *temp = (Extbyte *) locale;
-      xfree (temp);
-    }
+    xfree (locale);
  }
 #endif /* MULE */