Mercurial > hg > xemacs-beta
diff src/device-x.c @ 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 | 97eb4942aec8 |
children | 5efbd1253905 |
line wrap: on
line diff
--- 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 */