aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-09-01 15:08:06 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-11-17 11:36:56 +0100
commitdbb13d2f0eba1770a96cac537218e7625556e172 (patch)
tree35217ed2fa3e306a936906814e956591fd9959ce /ubi-utils
parent942dec0faab61b3d9c814ed013c578edde94d0bb (diff)
Remove unused ubiutils_print_text from ubi-utils common
The function ubiutils_print_text was previously used by ubinize to pretty-print parts of the help text. Since the help text has been moved to a man page, the function is no longer used/needed. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/include/ubiutils-common.h1
-rw-r--r--ubi-utils/ubiutils-common.c53
2 files changed, 0 insertions, 54 deletions
diff --git a/ubi-utils/include/ubiutils-common.h b/ubi-utils/include/ubiutils-common.h
index 9762837..99c18f7 100644
--- a/ubi-utils/include/ubiutils-common.h
+++ b/ubi-utils/include/ubiutils-common.h
@@ -25,7 +25,6 @@ extern "C" {
long long ubiutils_get_bytes(const char *str);
void ubiutils_print_bytes(long long bytes, int bracket);
-void ubiutils_print_text(FILE *stream, const char *txt, int len);
int ubiutils_srand(void);
#ifdef __cplusplus
diff --git a/ubi-utils/ubiutils-common.c b/ubi-utils/ubiutils-common.c
index 6609a6b..5636785 100644
--- a/ubi-utils/ubiutils-common.c
+++ b/ubi-utils/ubiutils-common.c
@@ -129,59 +129,6 @@ void ubiutils_print_bytes(long long bytes, int bracket)
}
/**
- * ubiutils_print_text - print text and fold it.
- * @stream: file stream to print to
- * @text: text to print
- * @width: maximum allowed text width
- *
- * Print text and fold it so that each line would not have more then @width
- * characters.
- */
-void ubiutils_print_text(FILE *stream, const char *text, int width)
-{
- int pos, bpos = 0;
- const char *p;
- char line[1024];
-
- if (width > 1023) {
- fprintf(stream, "%s\n", text);
- return;
- }
- p = text;
- pos = 0;
- while (p[pos]) {
- while (!isspace(p[pos])) {
- line[pos] = p[pos];
- if (!p[pos])
- break;
- ++pos;
- if (pos == width) {
- line[pos] = '\0';
- fprintf(stream, "%s\n", line);
- p += pos;
- pos = 0;
- }
- }
- while (pos < width) {
- line[pos] = p[pos];
- if (!p[pos]) {
- bpos = pos;
- break;
- }
- if (isspace(p[pos]))
- bpos = pos;
- ++pos;
- }
- line[bpos] = '\0';
- fprintf(stream, "%s\n", line);
- p += bpos;
- pos = 0;
- while (p[pos] && isspace(p[pos]))
- ++p;
- }
-}
-
-/**
* ubiutils_srand - randomly seed the standard pseudo-random generator.
*
* This helper function seeds the standard libc pseudo-random generator with a