Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
strbuf_add_wrapped*(): Remove unused return value
author
Steffen Prohaska
<prohaska@zib.de>
Tue, 11 Dec 2012 05:59:22 +0000
(06:59 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 11 Dec 2012 18:05:17 +0000
(10:05 -0800)
Since shortlog isn't using the return value anymore (see previous
commit), the functions can be changed to void.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
utf8.c
patch
|
blob
|
history
utf8.h
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
5b59708
)
diff --git
a/utf8.c
b/utf8.c
index 523a78a651c50129ab759fa319f8bfce55b2bee7..613eb94b46c91aaf9cc8d0a885d92377cb1eb8ed 100644
(file)
--- a/
utf8.c
+++ b/
utf8.c
@@
-323,7
+323,7
@@
static size_t display_mode_esc_sequence_len(const char *s)
* If indent is negative, assume that already -indent columns have been
* consumed (and no extra indent is necessary for the first line).
*/
* If indent is negative, assume that already -indent columns have been
* consumed (and no extra indent is necessary for the first line).
*/
-
int
strbuf_add_wrapped_text(struct strbuf *buf,
+
void
strbuf_add_wrapped_text(struct strbuf *buf,
const char *text, int indent1, int indent2, int width)
{
int indent, w, assume_utf8 = 1;
const char *text, int indent1, int indent2, int width)
{
int indent, w, assume_utf8 = 1;
@@
-332,7
+332,7
@@
int strbuf_add_wrapped_text(struct strbuf *buf,
if (width <= 0) {
strbuf_add_indented_text(buf, text, indent1, indent2);
if (width <= 0) {
strbuf_add_indented_text(buf, text, indent1, indent2);
- return
1
;
+ return;
}
retry:
}
retry:
@@
-356,14
+356,14
@@
int strbuf_add_wrapped_text(struct strbuf *buf,
if (w <= width || !space) {
const char *start = bol;
if (!c && text == start)
if (w <= width || !space) {
const char *start = bol;
if (!c && text == start)
- return
w
;
+ return;
if (space)
start = space;
else
strbuf_addchars(buf, ' ', indent);
strbuf_add(buf, start, text - start);
if (!c)
if (space)
start = space;
else
strbuf_addchars(buf, ' ', indent);
strbuf_add(buf, start, text - start);
if (!c)
- return
w
;
+ return;
space = text;
if (c == '\t')
w |= 0x07;
space = text;
if (c == '\t')
w |= 0x07;
@@
-405,13
+405,12
@@
int strbuf_add_wrapped_text(struct strbuf *buf,
}
}
}
}
-
int
strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len,
+
void
strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len,
int indent, int indent2, int width)
{
char *tmp = xstrndup(data, len);
int indent, int indent2, int width)
{
char *tmp = xstrndup(data, len);
-
int r =
strbuf_add_wrapped_text(buf, tmp, indent, indent2, width);
+ strbuf_add_wrapped_text(buf, tmp, indent, indent2, width);
free(tmp);
free(tmp);
- return r;
}
int is_encoding_utf8(const char *name)
}
int is_encoding_utf8(const char *name)
diff --git
a/utf8.h
b/utf8.h
index 81f2c82fabcf63e3bb02c15beb4a0409afd9ab7b..f50c567d4202142325ce7a7f991b42775ff0fca5 100644
(file)
--- a/
utf8.h
+++ b/
utf8.h
@@
-8,9
+8,9
@@
int utf8_strwidth(const char *string);
int is_utf8(const char *text);
int is_encoding_utf8(const char *name);
int is_utf8(const char *text);
int is_encoding_utf8(const char *name);
-
int
strbuf_add_wrapped_text(struct strbuf *buf,
+
void
strbuf_add_wrapped_text(struct strbuf *buf,
const char *text, int indent, int indent2, int width);
const char *text, int indent, int indent2, int width);
-
int
strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len,
+
void
strbuf_add_wrapped_bytes(struct strbuf *buf, const char *data, int len,
int indent, int indent2, int width);
#ifndef NO_ICONV
int indent, int indent2, int width);
#ifndef NO_ICONV