diff options
Diffstat (limited to 'ex_temp.c')
| -rw-r--r-- | ex_temp.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -203,7 +203,7 @@ getline(line tl) bp = getblock(tl, READ); nl = nleft; tl &= ~OFFMSK; - while (*lp++ = *bp++) + while ((*lp++ = *bp++)) if (--nl == 0) { bp = getblock(tl += INCRMT, READ); nl = nleft; @@ -224,7 +224,7 @@ putline(void) bp = getblock(tl, WRITE); nl = nleft; tl &= ~OFFMSK; - while (*bp = *lp++) { + while ((*bp = *lp++)) { if (*bp++ == '\n') { *--bp = 0; linebp = lp; @@ -509,7 +509,7 @@ oops: int REGblk(void) { - register int i, j, m; + unsigned int i, j, m; for (i = 0; i < sizeof rused / sizeof rused[0]; i++) { m = (rused[i] ^ 0177777) & 0177777; @@ -521,7 +521,7 @@ REGblk(void) j++, m >>= 1; rused[i] |= (1 << j); #ifdef RDEBUG - printf("allocating block %d\n", i * 16 + j); + ex_printf("allocating block %d\n", i * 16 + j); #endif return (i * 16 + j); } @@ -552,7 +552,7 @@ KILLreg(register int c) sp->rg_flags = sp->rg_nleft = 0; while (rblock != 0) { #ifdef RDEBUG - printf("freeing block %d\n", rblock); + ex_printf("freeing block %d\n", rblock); #endif rused[rblock / 16] &= ~(1 << (rblock % 16)); regio(rblock, (ssize_t (*)(int, void *, size_t))shread); @@ -679,20 +679,20 @@ YANKreg(register int c) rblock = 0; rnleft = 0; } - CP(savelb,linebuf); + lcpy(savelb,linebuf, LBSIZE); for (addr = addr1; addr <= addr2; addr++) { getline(*addr); if (sp->rg_flags) { if (addr == addr2) *wcursor = 0; if (addr == addr1) - strcpy(linebuf, cursor); + lcpy(linebuf, cursor, LBSIZE); } YANKline(); } rbflush(); killed(); - CP(linebuf,savelb); + lcpy(linebuf,savelb, LBSIZE); free(savelb); } |
