Commits

Anonymous committed df943a1

got rid of shift_buf, use memmove()

Comments (0)

Files changed (1)

 	fflush(stdout);
 }
 
-void shift_buf(char *buf, int ind, int len, int delta)
-{
-	int i;
-
-	for (i = (delta > 0) ? len - 1 : ind ; i >= ind && i < len; i -= (delta > 0) ? 1 : -1)
-		buf[i + delta] = buf[i];
-}
-
 int width(char *buf, int *ind, int len, int crement)
 {
 	int nb, mask;
 						break;
 					default :
 						if (cur != len)
-							shift_buf(usrbuf, cur, len, 1);
+							memmove(usrbuf + cur + 1, usrbuf + cur, len - cur);
 						usrbuf[cur] = c;
 
 						if (c & 0x80) { // not ascii, so...