summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-12-14 19:53:29 -0700
committerKarl Williamson <public@khwilliamson.com>2013-12-17 09:37:57 -0700
commitd3c0b317ea8dd34a3cbcef6b0fc34778cd13fcce (patch)
tree444fbe0e29d93f920022ff0da0836b44f212ff7e /mg.c
parentb35e4f8b3f15f0474d08f63e1f479787e261f485 (diff)
downloadperl-d3c0b317ea8dd34a3cbcef6b0fc34778cd13fcce.tar.gz
mg.c: White-space only
Indent code that's in a block added in the previous commit.
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/mg.c b/mg.c
index 45a8ac1691..8c57e2a532 100644
--- a/mg.c
+++ b/mg.c
@@ -754,24 +754,23 @@ S_fixup_errno_string(pTHX_ SV* sv)
}
else {
- /* In some locales the error string may come back as UTF-8, in
- * which case we should turn on that flag. This didn't use to
- * happen, and to avoid any possible backward compatibility issues,
- * we don't turn on the flag unless we have to. So the flag stays
- * off for an entirely ASCII string. We assume that if the string
- * looks like UTF-8, it really is UTF-8: "text in any other
- * encoding that uses bytes with the high bit set is extremely
- * unlikely to pass a UTF-8 validity test"
- * (http://en.wikipedia.org/wiki/Charset_detection). There is a
- * potential that we will get it wrong however, especially on short
- * error message text. (If it turns out to be necessary, we could
- * also keep track if the current LC_MESSAGES locale is UTF-8) */
- if (! IN_BYTES /* respect 'use bytes' */
- && ! is_ascii_string((U8*) SvPVX_const(sv), SvCUR(sv))
- && is_utf8_string((U8*) SvPVX_const(sv), SvCUR(sv)))
- {
- SvUTF8_on(sv);
- }
+ /* In some locales the error string may come back as UTF-8, in which
+ * case we should turn on that flag. This didn't use to happen, and to
+ * avoid any possible backward compatibility issues, we don't turn on
+ * the flag unless we have to. So the flag stays off for an entirely
+ * ASCII string. We assume that if the string looks like UTF-8, it
+ * really is UTF-8: "text in any other encoding that uses bytes with
+ * the high bit set is extremely unlikely to pass a UTF-8 validity
+ * test" (http://en.wikipedia.org/wiki/Charset_detection). There is a
+ * potential that we will get it wrong however, especially on short
+ * error message text. (If it turns out to be necessary, we could also
+ * keep track if the current LC_MESSAGES locale is UTF-8) */
+ if (! IN_BYTES /* respect 'use bytes' */
+ && ! is_ascii_string((U8*) SvPVX_const(sv), SvCUR(sv))
+ && is_utf8_string((U8*) SvPVX_const(sv), SvCUR(sv)))
+ {
+ SvUTF8_on(sv);
+ }
}
}