+2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ * io/unit.c: Separate copyright years by ','.
+ (compare, insert_unit, delete_unit, is_internal_unit, close_units):
+ Remove blank line in beginning of function.
+ (get_unit): Simplify code.
+
2004-08-31 Paul Brook <paul@codesourcery.com>
* io/unit.c (get_unit): Remove superfluous if.
-/* Copyright (C) 2002-2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Contributed by Andy Vaught
This file is part of the GNU Fortran 95 runtime library (libgfortran).
static int
compare (int a, int b)
{
-
if (a < b)
return -1;
if (a > b)
void
insert_unit (gfc_unit * new)
{
-
new->priority = pseudo_random ();
g.unit_root = insert (new, g.unit_root);
}
static void
delete_unit (gfc_unit * old)
{
-
g.unit_root = delete_treap (old, g.unit_root);
}
gfc_unit *
get_unit (int read_flag)
{
- gfc_unit *u;
-
if (ioparm.internal_unit != NULL)
{
internal_unit.s =
/* Has to be an external unit */
- u = find_unit (ioparm.unit);
-
- return u;
+ return find_unit (ioparm.unit);
}
int
is_internal_unit ()
{
-
return current_unit == &internal_unit;
}
void
close_units (void)
{
-
while (g.unit_root != NULL)
close_unit (g.unit_root);
}