# HG changeset patch # User Ben Wing # Date 1271380448 18000 # Node ID fcdb86afcb9126fb3fa2d2ca993ffa41fb0ddd09 # Parent 912c34f1d7c8f51f6adea0e13078c2e826e56ee8# Parent 733f067a73ce257c274e5bac1c225beb5c33a6e5 merge diff -r 733f067a73ce -r fcdb86afcb91 src/ChangeLog --- a/src/ChangeLog Thu Apr 15 17:01:08 2010 +0100 +++ b/src/ChangeLog Thu Apr 15 20:14:08 2010 -0500 @@ -1,3 +1,9 @@ +2010-04-15 Ben Wing + + * 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 * specifier.c (specifier_memory_usage): diff -r 733f067a73ce -r fcdb86afcb91 src/device-x.c --- a/src/device-x.c Thu Apr 15 17:01:08 2010 +0100 +++ b/src/device-x.c Thu Apr 15 20:14:08 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 */