diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2016-10-07 23:46:05 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:27 +0200 |
commit | e2e45b2b3abf46e4e5c27d7c655769f2b693446e (patch) | |
tree | 265fd610e8f45563804c32228df9ebafe3076c96 /nx-X11/lib/X11/lcFile.c | |
parent | 878040bf0bdb5d791cbe2ac6e07899c149517a79 (diff) | |
download | nx-libs-e2e45b2b3abf46e4e5c27d7c655769f2b693446e.tar.gz nx-libs-e2e45b2b3abf46e4e5c27d7c655769f2b693446e.tar.bz2 nx-libs-e2e45b2b3abf46e4e5c27d7c655769f2b693446e.zip |
Align files with upstream libX11-1.6.0
This commit looks a bit crazy at first glance. It (re-)introduces lots
of whitespaces and bad formatting.
Explanation: Backporting upstream changes lead to commits being
applied out of order. This meant a lot of manual intervention which in
turn lead to slight differences between upstream and NX.
With this commit these slight differences are minimized which will be
of great help when adding further upstream patches.
Diffstat (limited to 'nx-X11/lib/X11/lcFile.c')
-rw-r--r-- | nx-X11/lib/X11/lcFile.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/nx-X11/lib/X11/lcFile.c b/nx-X11/lib/X11/lcFile.c index 36f0ddf5a..aeaae245d 100644 --- a/nx-X11/lib/X11/lcFile.c +++ b/nx-X11/lib/X11/lcFile.c @@ -635,53 +635,53 @@ _XlcLocaleDirName(char *dir_name, size_t dir_len, char *lc_name) for (i = 0; i < n; ++i) { if ((2 + (args[i] ? strlen(args[i]) : 0) + - strlen(locale_alias)) < PATH_MAX) { - sprintf (buf, "%s/%s", args[i], locale_alias); - name = resolve_name(lc_name, buf, LtoR); + strlen(locale_alias)) < PATH_MAX) { + sprintf (buf, "%s/%s", args[i], locale_alias); + name = resolve_name(lc_name, buf, LtoR); if (!name) { if (!nlc_name) nlc_name = normalize_lcname(lc_name); if (nlc_name) name = resolve_name (nlc_name, buf, LtoR); } - } + } - /* If name is not an alias, use lc_name for locale.dir search */ - if (name == NULL) - name = lc_name; + /* If name is not an alias, use lc_name for locale.dir search */ + if (name == NULL) + name = lc_name; - /* look at locale.dir */ + /* look at locale.dir */ - target_dir = args[i]; - if (!target_dir) { - /* something wrong */ - if (name != lc_name) - Xfree(name); - continue; - } - if ((1 + strlen (target_dir) + strlen("locale.dir")) < PATH_MAX) { - sprintf(buf, "%s/locale.dir", target_dir); - target_name = resolve_name(name, buf, RtoL); - } - if (name != lc_name) - Xfree(name); - if (target_name != NULL) { - char *p = 0; - if ((p = strstr(target_name, "/XLC_LOCALE"))) { - *p = '\0'; - break; - } - Xfree(target_name); - target_name = NULL; - } - name = NULL; + target_dir = args[i]; + if (!target_dir) { + /* something wrong */ + if (name != lc_name) + Xfree(name); + continue; + } + if ((1 + strlen (target_dir) + strlen("locale.dir")) < PATH_MAX) { + sprintf(buf, "%s/locale.dir", target_dir); + target_name = resolve_name(name, buf, RtoL); + } + if (name != lc_name) + Xfree(name); + if (target_name != NULL) { + char *p = 0; + if ((p = strstr(target_name, "/XLC_LOCALE"))) { + *p = '\0'; + break; + } + Xfree(target_name); + target_name = NULL; + } + name = NULL; } if (nlc_name) Xfree(nlc_name); if (target_name == NULL) { - /* vendor locale name == Xlocale name, no expansion of alias */ - target_dir = args[0]; - target_name = lc_name; + /* vendor locale name == Xlocale name, no expansion of alias */ + target_dir = args[0]; + target_name = lc_name; } /* snprintf(dir_name, dir_len, "%s/%", target_dir, target_name); */ strncpy(dir_name, target_dir, dir_len - 1); @@ -694,7 +694,7 @@ _XlcLocaleDirName(char *dir_name, size_t dir_len, char *lc_name) dir_name[dir_len - 1] = '\0'; } if (target_name != lc_name) - Xfree(target_name); + Xfree(target_name); if (last_dir_name != 0) Xfree (last_dir_name); @@ -757,7 +757,7 @@ _XlcLocaleLibDirName(char *dir_name, size_t dir_len, char *lc_name) Xfree(name); continue; } - if ((1 + strlen (target_dir) + strlen("locale.dir")) < PATH_MAX) { + if ((1 + strlen (target_dir) + strlen("locale.dir")) < PATH_MAX) { sprintf(buf, "%s/locale.dir", target_dir); target_name = resolve_name(name, buf, RtoL); } |