Fix whitespace in canvas and str.c

This commit is contained in:
cyanpencil 2018-07-02 19:13:35 +02:00 committed by Anton Kochkov
parent 611ab267ef
commit 602c8bf53b
2 changed files with 0 additions and 4 deletions

View File

@ -265,7 +265,6 @@ beach: {
}
}
static int utf8len_fixed(const char *s, int n) {
int i = 0, j = 0, fullwidths = 0;
while (s[i] && n > 0) {
@ -361,7 +360,6 @@ R_API void r_cons_canvas_write(RConsCanvas *c, const char *s) {
slen = piece_len;
if (piece_len > left) {
/*int utf8_piece_len = utf8len_fixed (s_part, piece_len, c->bsize[c->y] - c->x);*/
int utf8_piece_len = utf8len_fixed (s_part, piece_len);
if (utf8_piece_len >= c->w - attr_x) {
slen = left;
@ -389,7 +387,6 @@ R_API void r_cons_canvas_write(RConsCanvas *c, const char *s) {
c->attr = Color_RESET;
stamp_attr (c, c->y*c->w + attr_x, 0);
c->y++;
s++;
if (*s == '\0' || c->y >= c->h) {
break;

View File

@ -1509,7 +1509,6 @@ R_API int r_str_ansi_filter(char *str, char **out, int **cposs, int len) {
return j;
}
R_API char *r_str_ansi_crop(const char *str, ut32 x, ut32 y, ut32 x2, ut32 y2) {
char *r, *r_end, *ret;
const char *s, *s_start;