61757: fix a character type problem. Fix provided by Charles Hannum <mycroft@netbsd.org>, r=me, sr=sfraser

git-svn-id: svn://10.0.0.236/trunk@86959 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
2001-02-14 01:23:23 +00:00
parent 6b68fd0751
commit db324cca20
2 changed files with 8 additions and 8 deletions

View File

@@ -62,12 +62,12 @@ Compare(nsString& str, nsString& aFileName)
// Inefficiently read from the file:
nsString inString;
char c;
int c;
int index = 0;
int different = 0;
while ((c = getc(file)) != EOF)
{
inString.AppendWithConversion(c);
inString.AppendWithConversion((char)c);
// CVS isn't doing newline comparisons on these files for some reason.
// So compensate for possible newline problems in the CVS file:
if (c == '\n' && str[index] == '\r')
@@ -302,9 +302,9 @@ Usage: %s [-i intype] [-o outtype] [-f flags] [-w wrapcol] [-c comparison_file]
// Read in the string: very inefficient, but who cares?
nsString inString;
char c;
int c;
while ((c = getc(file)) != EOF)
inString.AppendWithConversion(c);
inString.AppendWithConversion((char)c);
if (file != stdin)
fclose(file);