Navigation Menu

Skip to content

Commit

Permalink
Unify the pointer casting style in my code.
Browse files Browse the repository at this point in the history
Code from 1.8x are left for diff-friendly.
  • Loading branch information
lichray committed Oct 10, 2012
1 parent 13f0cd4 commit bc29a77
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common/encoding.c
Expand Up @@ -59,7 +59,7 @@ static char text_chars[256] = {
int
looks_utf8(const char *ibuf, size_t nbytes)
{
const u_char *buf = (u_char*)ibuf;
const u_char *buf = (u_char *)ibuf;
size_t i;
int n;
int gotone = 0, ctrl = 0;
Expand Down
2 changes: 1 addition & 1 deletion common/exf.c
Expand Up @@ -1263,7 +1263,7 @@ file_encinit(SCR *sp)
key.data = &lno;
key.size = sizeof(lno);
if (!ep->db->seq(ep->db, &key, &data, R_LAST) &&
*(char*)data.data == '\0')
*(char *)data.data == '\0')
ep->db->del(ep->db, &key, 0);
o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-16le", 0);
break;
Expand Down
4 changes: 2 additions & 2 deletions vi/v_txt.c
Expand Up @@ -2304,7 +2304,7 @@ txt_emark(SCR *sp, TEXT *tp, size_t cno)
for (cno += chlen; chlen--;)
*p++ = ' ';
else
for (kp = (u_char*)
for (kp = (u_char *)
KEY_NAME(sp, tp->lb[cno]),
cno += chlen; chlen--;)
*p++ = *kp++;
Expand Down Expand Up @@ -2501,7 +2501,7 @@ txt_insch(SCR *sp, TEXT *tp, CHAR_T *chp, u_int flags)
for (p = tp->lb + cno + 1; chlen--;)
*p++ = ' ';
else
for (kp = (u_char*)
for (kp = (u_char *)
KEY_NAME(sp, tp->lb[cno]) + nlen,
p = tp->lb + cno + 1; chlen--;)
*p++ = *kp++;
Expand Down
4 changes: 2 additions & 2 deletions vi/vs_line.c
Expand Up @@ -436,7 +436,7 @@ empty: (void)gp->scr_addstr(sp,
if (KEY_NEEDSWIDE(sp, ch))
*cbp++ = ch;
else
for (kp = (u_char*)
for (kp = (u_char *)
KEY_NAME(sp, ch) + offset_in_char;
chlen--;)
*cbp++ = *kp++;
Expand All @@ -459,7 +459,7 @@ empty: (void)gp->scr_addstr(sp,
chlen = KEY_LEN(sp, '$');
if (cbp + chlen >= ecbp)
FLUSH;
for (kp = (u_char*)
for (kp = (u_char *)
KEY_NAME(sp, '$'); chlen--;)
*cbp++ = *kp++;
}
Expand Down

0 comments on commit bc29a77

Please sign in to comment.