version 1.21, 2003/07/21 14:32:21 |
version 1.22, 2003/07/21 21:01:45 |
|
|
{ |
{ |
char *s, R_newline = '\n'; |
char *s, R_newline = '\n'; |
|
|
s = ifetch(line, 0); |
|
if (s == NULL) |
|
return; |
|
/* Note: string is not null terminated. */ |
/* Note: string is not null terminated. */ |
for (; putc(*s, ofp) != R_newline; s++) |
for (s=ifetch(line, 0); putc(*s, ofp) != R_newline; s++) |
; |
; |
} |
} |
|
|
|
|
bool |
bool |
similar(char *a, char *b, int len) |
similar(char *a, char *b, int len) |
{ |
{ |
if (a == NULL || b == NULL) |
|
return FALSE; |
|
while (len) { |
while (len) { |
if (isspace(*b)) { /* whitespace (or \n) to match? */ |
if (isspace(*b)) { /* whitespace (or \n) to match? */ |
if (!isspace(*a)) /* no corresponding whitespace? */ |
if (!isspace(*a)) /* no corresponding whitespace? */ |