--- src/usr.bin/make/Attic/var_modify.c 2005/01/24 05:12:58 1.15 +++ src/usr.bin/make/Attic/var_modify.c 2005/01/24 05:13:58 1.16 @@ -75,7 +75,7 @@ VarHead(const char *word, Boolean addSpa if (addSpace) { Buf_AddByte(buf, (Byte)' '); } - Buf_AddBytes(buf, slash - word, (const Byte *)word); + Buf_AppendRange(buf, word, slash); } else { /* * If no directory part, give . (q.v. the POSIX standard) @@ -180,7 +180,7 @@ VarRoot(const char *word, Boolean addSpa dot = strrchr(word, '.'); if (dot != NULL) { - Buf_AddBytes(buf, dot - word, (const Byte *)word); + Buf_AddBytes(buf, word, dot); } else { Buf_Append(buf, word); } @@ -381,7 +381,7 @@ VarSubstitute(const char *word, Boolean } addSpace = TRUE; } - Buf_AddBytes(buf, cp - word, (const Byte *)word); + Buf_AppendRange(buf, word, cp); Buf_AddBytes(buf, pattern->rightLen, (Byte *)pattern->rhs); } else { /* @@ -413,7 +413,7 @@ VarSubstitute(const char *word, Boolean Buf_AddByte(buf, (Byte)' '); addSpace = FALSE; } - Buf_AddBytes(buf, cp-word, (const Byte *)word); + Buf_AppendRange(buf, word, cp); Buf_AddBytes(buf, pattern->rightLen, (Byte *)pattern->rhs); wordLen -= (cp - word) + pattern->leftLen; word = cp + pattern->leftLen;