看板 DFBSD_submit 關於我們 聯絡資訊
This is a multi-part message in MIME format. --------------050607010706050805090702 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit --------------050607010706050805090702 Content-Type: text/plain; name="patch-6.3" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-6.3" --- 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; --------------050607010706050805090702--