diff options
Diffstat (limited to 'gcc/intl.c')
-rw-r--r-- | gcc/intl.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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; +} + + + |