DragonFly submit List (threaded) for 2004-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
usr.bin/make reduce diffs in var_modify.c from FreeBSD
--- var_modify.c 13 Nov 2004 00:06:16 -0000 1.1
+++ var_modify.c 27 Nov 2004 13:44:25 -0000
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2002 Juli Mallett.
* Copyright (c) 1988, 1989, 1990, 1993
* The Regents of the University of California. All rights reserved.
* Copyright (c) 1989 by Berkeley Softworks
@@ -69,7 +66,7 @@
char *slash;
slash = strrchr (word, '/');
- if (slash != (char *)NULL) {
+ if (slash != NULL) {
if (addSpace) {
Buf_AddByte (buf, (Byte)' ');
}
@@ -115,7 +112,7 @@
}
slash = strrchr (word, '/');
- if (slash != (char *)NULL) {
+ if (slash != NULL) {
*slash++ = '\0';
Buf_AddBytes (buf, strlen(slash), (Byte *)slash);
slash[-1] = '/';
@@ -145,7 +142,7 @@
char *dot;
dot = strrchr (word, '.');
- if (dot != (char *)NULL) {
+ if (dot != NULL) {
if (addSpace) {
Buf_AddByte (buf, (Byte)' ');
}
@@ -182,7 +179,7 @@
}
dot = strrchr (word, '.');
- if (dot != (char *)NULL) {
+ if (dot != NULL) {
*dot = '\0';
Buf_AddBytes (buf, strlen (word), (Byte *)word);
*dot = '.';
@@ -212,7 +209,7 @@
Boolean
VarMatch (const char *word, Boolean addSpace, Buffer buf, void *pattern)
{
- if (Str_Match(word, (char *) pattern)) {
+ if (Str_Match(word, pattern)) {
if (addSpace) {
Buf_AddByte(buf, (Byte)' ');
}
@@ -280,7 +277,7 @@
Boolean
VarNoMatch (const char *word, Boolean addSpace, Buffer buf, void *pattern)
{
- if (!Str_Match(word, (char *) pattern)) {
+ if (!Str_Match(word, pattern)) {
if (addSpace) {
Buf_AddByte(buf, (Byte)' ');
}
@@ -411,7 +408,7 @@
origSize = Buf_Size(buf);
while (!done) {
cp = strstr(word, pattern->lhs);
- if (cp != (char *)NULL) {
+ if (cp != NULL) {
if (addSpace && (((cp - word) + pattern->rightLen) != 0)){
Buf_AddByte(buf, (Byte)' ');
addSpace = FALSE;
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]