mirror of git://gcc.gnu.org/git/gcc.git
re PR libfortran/20163 ([4.0 only] gfortran - error opening direct access file)
2005-04-09 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/20163
* runtime/string.c (compare0): Use fstrlen() to
strip trailing blanks from option string.
From-SVN: r97923
This commit is contained in:
parent
bbaa6cf677
commit
130bcb37be
|
|
@ -1,3 +1,9 @@
|
||||||
|
2005-04-09 Thomas Koenig <Thomas.Koenig@online.de>
|
||||||
|
|
||||||
|
PR libfortran/20163
|
||||||
|
* runtime/string.c (compare0): Use fstrlen() to
|
||||||
|
strip trailing blanks from option string.
|
||||||
|
|
||||||
2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
|
2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
PR fortran/13257
|
PR fortran/13257
|
||||||
|
|
|
||||||
|
|
@ -41,17 +41,11 @@ static int
|
||||||
compare0 (const char *s1, int s1_len, const char *s2)
|
compare0 (const char *s1, int s1_len, const char *s2)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
int len;
|
||||||
|
|
||||||
if (strncasecmp (s1, s2, s1_len) != 0)
|
/* Strip trailing blanks from the Fortran string. */
|
||||||
return 0;
|
len = fstrlen(s1, s1_len);
|
||||||
|
return strncasecmp(s1,s2,len) == 0;
|
||||||
/* The rest of s1 needs to be blanks for equality. */
|
|
||||||
|
|
||||||
for (i = strlen (s2); i < s1_len; i++)
|
|
||||||
if (s1[i] != ' ')
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue