[multiple changes]
2007-07-02 Steven G. Kargl <kargl@gcc.gnu.org> Restore collateral damage from ISO C Binding merge. 2007-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/32456 * io/unit.c (filename_from_unit): Don't use find_unit, instead search for unit directly. From-SVN: r126238
This commit is contained in:
parent
5cc4845564
commit
8eacc23d94
|
@ -1,3 +1,14 @@
|
||||||
|
2007-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
|
Restore collateral damage from ISO C Binding merge.
|
||||||
|
|
||||||
|
2007-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR libgfortran/32456
|
||||||
|
* io/unit.c (filename_from_unit): Don't use find_unit, instead search
|
||||||
|
for unit directly.
|
||||||
|
|
||||||
|
|
||||||
2007-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
|
2007-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
* Makefile.in: Regenerated with automake 1.9.6.
|
* Makefile.in: Regenerated with automake 1.9.6.
|
||||||
|
|
|
@ -690,11 +690,26 @@ update_position (gfc_unit *u)
|
||||||
must free memory allocated for the filename string. */
|
must free memory allocated for the filename string. */
|
||||||
|
|
||||||
char *
|
char *
|
||||||
filename_from_unit (int unit_number)
|
filename_from_unit (int n)
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
gfc_unit *u = NULL;
|
gfc_unit *u;
|
||||||
u = find_unit (unit_number);
|
int c;
|
||||||
|
|
||||||
|
/* Find the unit. */
|
||||||
|
u = unit_root;
|
||||||
|
while (u != NULL)
|
||||||
|
{
|
||||||
|
c = compare (n, u->unit_number);
|
||||||
|
if (c < 0)
|
||||||
|
u = u->left;
|
||||||
|
if (c > 0)
|
||||||
|
u = u->right;
|
||||||
|
if (c == 0)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get the filename. */
|
||||||
if (u != NULL)
|
if (u != NULL)
|
||||||
{
|
{
|
||||||
filename = (char *) get_mem (u->file_len + 1);
|
filename = (char *) get_mem (u->file_len + 1);
|
||||||
|
@ -703,4 +718,5 @@ filename_from_unit (int unit_number)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return (char *) NULL;
|
return (char *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue