aboutsummaryrefslogtreecommitdiff
path: root/gcc/intl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/intl.c')
-rw-r--r--gcc/intl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/intl.c b/gcc/intl.c
index 5b48615..63de3ec 100644
--- a/gcc/intl.c
+++ b/gcc/intl.c
@@ -120,3 +120,20 @@ gcc_gettext_width (const char *msgstr)
#endif
#endif /* ENABLE_NLS */
+
+/* Return the indent for successive lines, using the width of
+ the STR. STR must have been translated already. The string
+ must be freed by the caller. */
+
+char *
+get_spaces (const char *str)
+{
+ size_t len = gcc_gettext_width (str);
+ char *spaces = XNEWVEC(char, len + 1);
+ memset (spaces, ' ', len);
+ spaces[len] = '\0';
+ return spaces;
+}
+
+
+