c99_functions.c, [...]: Whitespace fixes.

* intrinsics/c99_functions.c, intrinsics/eoshift0.c,
        intrinsics/eoshift2.c, intrinsics/exit.c, intrinsics/flush.c,
        intrinsics/ishftc.c, intrinsics/mvbits.c, intrinsics/pack_generic.c,
        intrinsics/random.c, intrinsics/reshape_generic.c, intrinsics/size.c,
        intrinsics/spread_generic.c, intrinsics/stat.c,
	intrinsics/string_intrinsics.c, intrinsics/system_clock.c,
        intrinsics/transpose_generic.c, intrinsics/unlink.c,
        intrinsics/unpack_generic.c, io/backspace.c, io/format.c,
        io/list_read.c, io/lock.c, io/open.c, io/transfer.c, io/unix.c,
        io/write.c, runtime/environ.c, runtime/error.c,
        runtime/in_pack_generic.c, runtime/in_unpack_generic.c, runtime/main.c,
        runtime/memory.c, runtime/pause.c, runtime/stop.c,
        runtime/string.c: Whitespace fixes.

From-SVN: r91794
This commit is contained in:
Richard Henderson 2004-12-06 16:01:01 -08:00 committed by Richard Henderson
parent 9f91e6cc16
commit f21edfd62d
37 changed files with 158 additions and 344 deletions

View File

@ -1,3 +1,19 @@
2004-12-06 Richard Henderson <rth@redhat.com>
* intrinsics/c99_functions.c, intrinsics/eoshift0.c,
intrinsics/eoshift2.c, intrinsics/exit.c, intrinsics/flush.c,
intrinsics/ishftc.c, intrinsics/mvbits.c, intrinsics/pack_generic.c,
intrinsics/random.c, intrinsics/reshape_generic.c, intrinsics/size.c,
intrinsics/spread_generic.c, intrinsics/stat.c,
intrinsics/string_intrinsics.c, intrinsics/system_clock.c,
intrinsics/transpose_generic.c, intrinsics/unlink.c,
intrinsics/unpack_generic.c, io/backspace.c, io/format.c,
io/list_read.c, io/lock.c, io/open.c, io/transfer.c, io/unix.c,
io/write.c, runtime/environ.c, runtime/error.c,
runtime/in_pack_generic.c, runtime/in_unpack_generic.c, runtime/main.c,
runtime/memory.c, runtime/pause.c, runtime/stop.c,
runtime/string.c: Whitespace fixes.
2004-12-06 Richard Henderson <rth@redhat.com> 2004-12-06 Richard Henderson <rth@redhat.com>
* Makefile.am: Generate all m4 output under $(srcdir). * Makefile.am: Generate all m4 output under $(srcdir).

View File

@ -322,4 +322,3 @@ roundf(float x)
} }
} }
#endif #endif

View File

@ -204,4 +204,3 @@ __eoshift0_8 (gfc_array_char * ret, const gfc_array_char * array,
{ {
__eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1); __eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
} }

View File

@ -220,4 +220,3 @@ __eoshift2_8 (gfc_array_char * ret, const gfc_array_char * array,
{ {
__eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1); __eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
} }

View File

@ -33,7 +33,6 @@ Boston, MA 02111-1307, USA. */
void void
prefix(exit_i4) (GFC_INTEGER_4 * status) prefix(exit_i4) (GFC_INTEGER_4 * status)
{ {
if (status == NULL) if (status == NULL)
exit(0); exit(0);
exit(*status); exit(*status);
@ -42,7 +41,6 @@ prefix(exit_i4) (GFC_INTEGER_4 * status)
void void
prefix(exit_i8) (GFC_INTEGER_8 * status) prefix(exit_i8) (GFC_INTEGER_8 * status)
{ {
if (status == NULL) if (status == NULL)
exit(0); exit(0);
exit((int) *status); exit((int) *status);

View File

@ -48,7 +48,6 @@ recursive_flush (gfc_unit *us)
void void
prefix(flush_i4) (GFC_INTEGER_4 * unit) prefix(flush_i4) (GFC_INTEGER_4 * unit)
{ {
gfc_unit *us; gfc_unit *us;
/* flush all streams */ /* flush all streams */

View File

@ -61,4 +61,3 @@ ishftc8 (GFC_INTEGER_8 i, GFC_INTEGER_8 shift, GFC_INTEGER_8 size)
bits = i & ~mask; bits = i & ~mask;
return (i & mask) | (bits >> (size - shift)) | ((i << shift) & ~mask); return (i & mask) | (bits >> (size - shift)) | ((i << shift) & ~mask);
} }

View File

@ -60,4 +60,3 @@ SUB_NAME (const TYPE *from, const GFC_INTEGER_4 *frompos,
# undef TYPE # undef TYPE
# undef UTYPE # undef UTYPE
#endif #endif

View File

@ -123,7 +123,6 @@ __pack (gfc_array_char * ret, const gfc_array_char * array,
if (vector != NULL) if (vector != NULL)
{ {
/* The return array will have as many /* The return array will have as many
elements as there are in VECTOR. */ elements as there are in VECTOR. */
total = vector->dim[0].ubound + 1 - vector->dim[0].lbound; total = vector->dim[0].ubound + 1 - vector->dim[0].lbound;

View File

@ -485,7 +485,6 @@ prefix(random_r8) (GFC_REAL_8 *x)
void void
prefix(arandom_r4) (gfc_array_r4 *x) prefix(arandom_r4) (gfc_array_r4 *x)
{ {
index_type count[GFC_MAX_DIMENSIONS - 1]; index_type count[GFC_MAX_DIMENSIONS - 1];
index_type extent[GFC_MAX_DIMENSIONS - 1]; index_type extent[GFC_MAX_DIMENSIONS - 1];
index_type stride[GFC_MAX_DIMENSIONS - 1]; index_type stride[GFC_MAX_DIMENSIONS - 1];
@ -550,7 +549,6 @@ prefix(arandom_r4) (gfc_array_r4 *x)
void void
prefix(arandom_r8) (gfc_array_r8 *x) prefix(arandom_r8) (gfc_array_r8 *x)
{ {
index_type count[GFC_MAX_DIMENSIONS - 1]; index_type count[GFC_MAX_DIMENSIONS - 1];
index_type extent[GFC_MAX_DIMENSIONS - 1]; index_type extent[GFC_MAX_DIMENSIONS - 1];
index_type stride[GFC_MAX_DIMENSIONS - 1]; index_type stride[GFC_MAX_DIMENSIONS - 1];
@ -614,10 +612,8 @@ prefix(arandom_r8) (gfc_array_r8 *x)
must be called with no argument or exactly one argument. */ must be called with no argument or exactly one argument. */
void void
random_seed (GFC_INTEGER_4 *size, gfc_array_i4 * put, random_seed (GFC_INTEGER_4 *size, gfc_array_i4 *put, gfc_array_i4 *get)
gfc_array_i4 * get)
{ {
int i; int i;
if (size == NULL && put == NULL && get == NULL) if (size == NULL && put == NULL && get == NULL)
@ -670,5 +666,3 @@ random_seed (GFC_INTEGER_4 *size, gfc_array_i4 * put,
get->data[i * get->dim[0].stride] = (GFC_INTEGER_4) kiss_seed[i]; get->data[i * get->dim[0].stride] = (GFC_INTEGER_4) kiss_seed[i];
} }
} }

View File

@ -228,4 +228,3 @@ __reshape (parray * ret, parray * source, shape_type * shape,
} }
} }
} }

View File

@ -50,4 +50,3 @@ index_type size1 (const array_t * array, index_type dim)
size = 0; size = 0;
return size; return size;
} }

View File

@ -115,4 +115,3 @@ __spread (const gfc_array_char * ret, const gfc_array_char * source,
} }
} }
} }

View File

@ -56,7 +56,6 @@ void
prefix(stat_i4_sub) (char * name, gfc_array_i4 * sarray, prefix(stat_i4_sub) (char * name, gfc_array_i4 * sarray,
GFC_INTEGER_4 * status, gfc_charlen_type name_len) GFC_INTEGER_4 * status, gfc_charlen_type name_len)
{ {
int val; int val;
char *str; char *str;
struct stat sb; struct stat sb;
@ -147,7 +146,6 @@ void
prefix(stat_i8_sub) (char * name, gfc_array_i8 * sarray, prefix(stat_i8_sub) (char * name, gfc_array_i8 * sarray,
GFC_INTEGER_8 * status, gfc_charlen_type name_len) GFC_INTEGER_8 * status, gfc_charlen_type name_len)
{ {
int val; int val;
char *str; char *str;
struct stat sb; struct stat sb;
@ -250,7 +248,6 @@ GFC_INTEGER_8
prefix(stat_i8) (char * name, gfc_array_i8 * sarray, prefix(stat_i8) (char * name, gfc_array_i8 * sarray,
gfc_charlen_type name_len) gfc_charlen_type name_len)
{ {
GFC_INTEGER_8 val; GFC_INTEGER_8 val;
prefix(stat_i8_sub) (name, sarray, &val, name_len); prefix(stat_i8_sub) (name, sarray, &val, name_len);
return val; return val;
@ -271,7 +268,6 @@ void
prefix(fstat_i4_sub) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray, prefix(fstat_i4_sub) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray,
GFC_INTEGER_4 * status) GFC_INTEGER_4 * status)
{ {
int val; int val;
struct stat sb; struct stat sb;
@ -355,7 +351,6 @@ void
prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray, prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray,
GFC_INTEGER_8 * status) GFC_INTEGER_8 * status)
{ {
int val; int val;
struct stat sb; struct stat sb;
@ -439,7 +434,6 @@ prefix(fstat_i8_sub) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray,
GFC_INTEGER_4 GFC_INTEGER_4
prefix(fstat_i4) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray) prefix(fstat_i4) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray)
{ {
GFC_INTEGER_4 val; GFC_INTEGER_4 val;
prefix(fstat_i4_sub) (unit, sarray, &val); prefix(fstat_i4_sub) (unit, sarray, &val);
return val; return val;
@ -449,7 +443,6 @@ prefix(fstat_i4) (GFC_INTEGER_4 * unit, gfc_array_i4 * sarray)
GFC_INTEGER_8 GFC_INTEGER_8
prefix(fstat_i8) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray) prefix(fstat_i8) (GFC_INTEGER_8 * unit, gfc_array_i8 * sarray)
{ {
GFC_INTEGER_8 val; GFC_INTEGER_8 val;
prefix(fstat_i8_sub) (unit, sarray, &val); prefix(fstat_i8_sub) (unit, sarray, &val);
return val; return val;

View File

@ -168,7 +168,8 @@ concat_string (GFC_INTEGER_4 destlen, char * dest,
/* Return string with all trailing blanks removed. */ /* Return string with all trailing blanks removed. */
void void
string_trim (GFC_INTEGER_4 * len, void ** dest, GFC_INTEGER_4 slen, const char * src) string_trim (GFC_INTEGER_4 * len, void ** dest, GFC_INTEGER_4 slen,
const char * src)
{ {
int i; int i;
@ -392,4 +393,3 @@ string_repeat (char * dest, GFC_INTEGER_4 slen,
memmove (dest + (i * slen), src, slen); memmove (dest + (i * slen), src, slen);
} }
} }

View File

@ -197,4 +197,3 @@ prefix(system_clock_8)(GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate,
if (count_max != NULL) if (count_max != NULL)
*count_max = mx; *count_max = mx;
} }

View File

@ -88,4 +88,3 @@ __transpose (gfc_array_char * ret, gfc_array_char * source)
rptr += rxstride - (rystride * xcount); rptr += rxstride - (rystride * xcount);
} }
} }

View File

@ -63,9 +63,7 @@ void
prefix(unlink_i8_sub) (char * name, GFC_INTEGER_8 * status, prefix(unlink_i8_sub) (char * name, GFC_INTEGER_8 * status,
gfc_charlen_type name_len) gfc_charlen_type name_len)
{ {
GFC_INTEGER_4 status4; GFC_INTEGER_4 status4;
prefix (unlink_i4_sub) (name, &status4, name_len); prefix (unlink_i4_sub) (name, &status4, name_len);
if (status) if (status)
*status = status4; *status = status4;
@ -82,4 +80,3 @@ prefix(unlink) (char * name, gfc_charlen_type name_len)
prefix(unlink_i4_sub) (name, &status, name_len); prefix(unlink_i4_sub) (name, &status, name_len);
return status; return status;
} }

View File

@ -82,7 +82,6 @@ __unpack1 (const gfc_array_char * ret, const gfc_array_char * vector,
mptr = mask->data; mptr = mask->data;
vptr = vector->data; vptr = vector->data;
/* Use the same loop for both logical types. */ /* Use the same loop for both logical types. */
if (GFC_DESCRIPTOR_SIZE (mask) != 4) if (GFC_DESCRIPTOR_SIZE (mask) != 4)
{ {
@ -151,4 +150,3 @@ __unpack0 (const gfc_array_char * ret, const gfc_array_char * vector,
tmp.data = field; tmp.data = field;
__unpack1 (ret, vector, mask, &tmp); __unpack1 (ret, vector, mask, &tmp);
} }

View File

@ -72,7 +72,6 @@ formatted_backspace (void)
while (base != 0); while (base != 0);
/* base is the new pointer. Seek to it exactly */ /* base is the new pointer. Seek to it exactly */
done: done:
if (sseek (current_unit->s, base) == FAILURE) if (sseek (current_unit->s, base) == FAILURE)
goto io_error; goto io_error;

View File

@ -146,7 +146,6 @@ free_fnode (fnode * f)
void void
free_fnodes (void) free_fnodes (void)
{ {
if (avail - array >= FARRAY_SIZE) if (avail - array >= FARRAY_SIZE)
free_fnode (&array[0]); free_fnode (&array[0]);
@ -442,7 +441,6 @@ parse_format_list (void)
head = tail = NULL; head = tail = NULL;
/* Get the next format item */ /* Get the next format item */
format_item: format_item:
t = format_lex (); t = format_lex ();
switch (t) switch (t)
@ -632,8 +630,7 @@ format_item:
} }
/* In this state, t must currently be a data descriptor. Deal with /* In this state, t must currently be a data descriptor. Deal with
* things that can/must follow the descriptor */ things that can/must follow the descriptor */
data_desc: data_desc:
switch (t) switch (t)
{ {
@ -727,7 +724,6 @@ data_desc:
tail->u.real.e = -1; tail->u.real.e = -1;
/* Look for optional exponent */ /* Look for optional exponent */
t = format_lex (); t = format_lex ();
if (t != FMT_E) if (t != FMT_E)
saved_token = t; saved_token = t;
@ -852,8 +848,7 @@ between_desc:
} }
/* Optional comma is a weird between state where we've just finished /* Optional comma is a weird between state where we've just finished
* reading a colon, slash or P descriptor. */ reading a colon, slash or P descriptor. */
optional_comma: optional_comma:
t = format_lex (); t = format_lex ();
switch (t) switch (t)
@ -935,7 +930,6 @@ format_error (fnode * f, const char *message)
void void
parse_format (void) parse_format (void)
{ {
format_string = ioparm.format; format_string = ioparm.format;
format_string_len = ioparm.format_len; format_string_len = ioparm.format_len;
@ -1082,7 +1076,6 @@ next_format (void)
} }
/* If this is a data edit descriptor, then reversion has become OK. */ /* If this is a data edit descriptor, then reversion has become OK. */
done: done:
t = f->format; t = f->format;
@ -1105,7 +1098,6 @@ done:
void void
unget_format (fnode * f) unget_format (fnode * f)
{ {
saved_format = f; saved_format = f;
} }
@ -1248,7 +1240,6 @@ dump_format0 (fnode * f)
static void static void
dump_format1 (fnode * f) dump_format1 (fnode * f)
{ {
for (; f; f = f->next) for (; f; f = f->next)
dump_format1 (f); dump_format1 (f);
} }
@ -1258,7 +1249,6 @@ dump_format1 (fnode * f)
void void
dump_format (void) dump_format (void)
{ {
st_printf ("format = "); st_printf ("format = ");
dump_format0 (&array[0]); dump_format0 (&array[0]);
st_printf ("\n"); st_printf ("\n");

View File

@ -107,7 +107,6 @@ push_char (char c)
static void static void
free_saved (void) free_saved (void)
{ {
if (saved_string == NULL) if (saved_string == NULL)
return; return;
@ -165,7 +164,6 @@ done:
static void static void
unget_char (char c) unget_char (char c)
{ {
last_char = c; last_char = c;
} }
@ -780,7 +778,6 @@ get_string:
/* At this point, we have to have a separator, or else the string is /* At this point, we have to have a separator, or else the string is
invalid. */ invalid. */
done: done:
c = next_char (); c = next_char ();
if (is_separator (c)) if (is_separator (c))
@ -1281,7 +1278,6 @@ list_formatted_read (bt type, void *p, int len)
repeat_count = 1; repeat_count = 1;
} }
switch (type) switch (type)
{ {
case BT_INTEGER: case BT_INTEGER:
@ -1345,7 +1341,7 @@ set_value:
} }
void void
init_at_eol() init_at_eol(void)
{ {
at_eol = 0; at_eol = 0;
} }
@ -1365,7 +1361,6 @@ finish_list_read (void)
return; return;
} }
do do
{ {
c = next_char (); c = next_char ();

View File

@ -34,7 +34,6 @@ global_t g;
void void
library_start (void) library_start (void)
{ {
if (g.in_library) if (g.in_library)
internal_error ("Recursive library calls not allowed"); internal_error ("Recursive library calls not allowed");
@ -81,4 +80,3 @@ library_end (void)
memset (&ioparm, '\0', sizeof (ioparm)); memset (&ioparm, '\0', sizeof (ioparm));
ioparm.library_return = t; ioparm.library_return = t;
} }

View File

@ -30,106 +30,61 @@ static st_option access_opt[] = {
{"sequential", ACCESS_SEQUENTIAL}, {"sequential", ACCESS_SEQUENTIAL},
{"direct", ACCESS_DIRECT}, {"direct", ACCESS_DIRECT},
{NULL} {NULL}
}, action_opt[] = };
{
{
"read", ACTION_READ}
,
{
"write", ACTION_WRITE}
,
{
"readwrite", ACTION_READWRITE}
,
{
NULL}
}
, blank_opt[] = static st_option action_opt[] =
{ {
{ { "read", ACTION_READ},
"null", BLANK_NULL} { "write", ACTION_WRITE},
, { "readwrite", ACTION_READWRITE},
{ { NULL}
"zero", BLANK_ZERO} };
,
{
NULL}
}
, delim_opt[] = static st_option blank_opt[] =
{ {
{ { "null", BLANK_NULL},
"none", DELIM_NONE} { "zero", BLANK_ZERO},
, { NULL}
{ };
"apostrophe", DELIM_APOSTROPHE}
,
{
"quote", DELIM_QUOTE}
,
{
NULL}
}
, form_opt[] = static st_option delim_opt[] =
{ {
{ { "none", DELIM_NONE},
"formatted", FORM_FORMATTED} { "apostrophe", DELIM_APOSTROPHE},
, { "quote", DELIM_QUOTE},
{ { NULL}
"unformatted", FORM_UNFORMATTED} };
,
{
NULL}
}
, position_opt[] = static st_option form_opt[] =
{ {
{ { "formatted", FORM_FORMATTED},
"asis", POSITION_ASIS} { "unformatted", FORM_UNFORMATTED},
, { NULL}
{ };
"rewind", POSITION_REWIND}
,
{
"append", POSITION_APPEND}
,
{
NULL}
}
, status_opt[] = static st_option position_opt[] =
{ {
{ { "asis", POSITION_ASIS},
"unknown", STATUS_UNKNOWN} { "rewind", POSITION_REWIND},
, { "append", POSITION_APPEND},
{ { NULL}
"old", STATUS_OLD} };
,
{
"new", STATUS_NEW}
,
{
"replace", STATUS_REPLACE}
,
{
"scratch", STATUS_SCRATCH}
,
{
NULL}
}
, pad_opt[] = static st_option status_opt[] =
{ {
{ "unknown", STATUS_UNKNOWN},
{ "old", STATUS_OLD},
{ "new", STATUS_NEW},
{ "replace", STATUS_REPLACE},
{ "scratch", STATUS_SCRATCH},
{ NULL}
};
static st_option pad_opt[] =
{ {
"yes", PAD_YES} { "yes", PAD_YES},
, { "no", PAD_NO},
{ { NULL}
"no", PAD_NO}
,
{
NULL}
}; };
@ -141,7 +96,6 @@ static st_option access_opt[] = {
void void
test_endfile (gfc_unit * u) test_endfile (gfc_unit * u)
{ {
if (u->endfile == NO_ENDFILE && file_length (u->s) == file_position (u->s)) if (u->endfile == NO_ENDFILE && file_length (u->s) == file_position (u->s))
u->endfile = AT_ENDFILE; u->endfile = AT_ENDFILE;
} }
@ -153,7 +107,6 @@ test_endfile (gfc_unit * u)
static void static void
edit_modes (gfc_unit * u, unit_flags * flags) edit_modes (gfc_unit * u, unit_flags * flags)
{ {
/* Complain about attempts to change the unchangeable. */ /* Complain about attempts to change the unchangeable. */
if (flags->status != STATUS_UNSPECIFIED && if (flags->status != STATUS_UNSPECIFIED &&
@ -431,7 +384,6 @@ cleanup:
static void static void
already_open (gfc_unit * u, unit_flags * flags) already_open (gfc_unit * u, unit_flags * flags)
{ {
if (ioparm.file == NULL) if (ioparm.file == NULL)
{ {
edit_modes (u, flags); edit_modes (u, flags);

View File

@ -36,7 +36,6 @@ Boston, MA 02111-1307, USA. */
void void
set_integer (void *dest, int64_t value, int length) set_integer (void *dest, int64_t value, int length)
{ {
switch (length) switch (length)
{ {
case 8: case 8:
@ -95,7 +94,6 @@ max_value (int length, int signed_flag)
int int
convert_real (void *dest, const char *buffer, int length) convert_real (void *dest, const char *buffer, int length)
{ {
errno = 0; errno = 0;
switch (length) switch (length)
@ -204,7 +202,6 @@ read_a (fnode * f, char *p, int length)
static char * static char *
eat_leading_spaces (int *width, char *p) eat_leading_spaces (int *width, char *p)
{ {
for (;;) for (;;)
{ {
if (*width == 0 || *p != ' ') if (*width == 0 || *p != ' ')
@ -589,7 +586,6 @@ read_f (fnode * f, char *dest, int length)
} }
/* No exponent has been seen, so we use the current scale factor */ /* No exponent has been seen, so we use the current scale factor */
exponent = -g.scale_factor; exponent = -g.scale_factor;
goto done; goto done;
@ -600,7 +596,6 @@ bad_float:
return; return;
/* At this point the start of an exponent has been found */ /* At this point the start of an exponent has been found */
exp1: exp1:
while (w > 0 && *p == ' ') while (w > 0 && *p == ' ')
{ {
@ -626,7 +621,6 @@ exp1:
/* At this point a digit string is required. We calculate the value /* At this point a digit string is required. We calculate the value
of the exponent in order to take account of the scale factor and of the exponent in order to take account of the scale factor and
the d parameter before explict conversion takes place. */ the d parameter before explict conversion takes place. */
exp2: exp2:
if (!isdigit (*p)) if (!isdigit (*p))
goto bad_float; goto bad_float;

View File

@ -748,13 +748,11 @@ formatted_transfer (bt type, void *p, int len)
/* Come here when we need a data descriptor but don't have one. We /* Come here when we need a data descriptor but don't have one. We
push the current format node back onto the input, then return and push the current format node back onto the input, then return and
let the user program call us back with the data. */ let the user program call us back with the data. */
need_data: need_data:
unget_format (f); unget_format (f);
} }
/* Data transfer entry points. The type of the data entity is /* Data transfer entry points. The type of the data entity is
implicit in the subroutine call. This prevents us from having to implicit in the subroutine call. This prevents us from having to
share a common enum with the compiler. */ share a common enum with the compiler. */
@ -762,7 +760,6 @@ need_data:
void void
transfer_integer (void *p, int kind) transfer_integer (void *p, int kind)
{ {
g.item_count++; g.item_count++;
if (ioparm.library_return != LIBRARY_OK) if (ioparm.library_return != LIBRARY_OK)
return; return;
@ -773,7 +770,6 @@ transfer_integer (void *p, int kind)
void void
transfer_real (void *p, int kind) transfer_real (void *p, int kind)
{ {
g.item_count++; g.item_count++;
if (ioparm.library_return != LIBRARY_OK) if (ioparm.library_return != LIBRARY_OK)
return; return;
@ -784,7 +780,6 @@ transfer_real (void *p, int kind)
void void
transfer_logical (void *p, int kind) transfer_logical (void *p, int kind)
{ {
g.item_count++; g.item_count++;
if (ioparm.library_return != LIBRARY_OK) if (ioparm.library_return != LIBRARY_OK)
return; return;
@ -795,7 +790,6 @@ transfer_logical (void *p, int kind)
void void
transfer_character (void *p, int len) transfer_character (void *p, int len)
{ {
g.item_count++; g.item_count++;
if (ioparm.library_return != LIBRARY_OK) if (ioparm.library_return != LIBRARY_OK)
return; return;
@ -806,7 +800,6 @@ transfer_character (void *p, int len)
void void
transfer_complex (void *p, int kind) transfer_complex (void *p, int kind)
{ {
g.item_count++; g.item_count++;
if (ioparm.library_return != LIBRARY_OK) if (ioparm.library_return != LIBRARY_OK)
return; return;
@ -873,7 +866,6 @@ us_write (void)
static void static void
pre_position (void) pre_position (void)
{ {
if (current_unit->current_record) if (current_unit->current_record)
return; /* Already positioned. */ return; /* Already positioned. */
@ -1140,9 +1132,7 @@ data_transfer_init (int read_flag)
/* Start the data transfer if we are doing a formatted transfer. */ /* Start the data transfer if we are doing a formatted transfer. */
if (current_unit->flags.form == FORM_FORMATTED && !ioparm.list_format if (current_unit->flags.form == FORM_FORMATTED && !ioparm.list_format
&& ioparm.namelist_name == NULL && ionml == NULL) && ioparm.namelist_name == NULL && ionml == NULL)
formatted_transfer (0, NULL, 0); formatted_transfer (0, NULL, 0);
} }
@ -1198,7 +1188,6 @@ next_record_r (int done)
current_unit->bytes_left -= length; current_unit->bytes_left -= length;
} }
} }
break; break;
case FORMATTED_SEQUENTIAL: case FORMATTED_SEQUENTIAL:
@ -1367,7 +1356,6 @@ next_record (int done)
static void static void
finalize_transfer (void) finalize_transfer (void)
{ {
if ((ionml != NULL) && (ioparm.namelist_name != NULL)) if ((ionml != NULL) && (ioparm.namelist_name != NULL))
{ {
if (ioparm.namelist_read_mode) if (ioparm.namelist_read_mode)
@ -1429,7 +1417,6 @@ iolength_transfer (bt type, void *dest, int len)
static void static void
iolength_transfer_init (void) iolength_transfer_init (void)
{ {
if (ioparm.iolength != NULL) if (ioparm.iolength != NULL)
*ioparm.iolength = 0; *ioparm.iolength = 0;
@ -1438,7 +1425,6 @@ iolength_transfer_init (void)
/* Set up the subroutine that will handle the transfers. */ /* Set up the subroutine that will handle the transfers. */
transfer = iolength_transfer; transfer = iolength_transfer;
} }
@ -1451,7 +1437,6 @@ void
st_iolength (void) st_iolength (void)
{ {
library_start (); library_start ();
iolength_transfer_init (); iolength_transfer_init ();
} }
@ -1467,7 +1452,6 @@ st_iolength_done (void)
void void
st_read (void) st_read (void)
{ {
library_start (); library_start ();
data_transfer_init (1); data_transfer_init (1);
@ -1502,7 +1486,6 @@ void
st_read_done (void) st_read_done (void)
{ {
finalize_transfer (); finalize_transfer ();
library_end (); library_end ();
} }
@ -1510,7 +1493,6 @@ st_read_done (void)
void void
st_write (void) st_write (void)
{ {
library_start (); library_start ();
data_transfer_init (0); data_transfer_init (0);
} }
@ -1519,7 +1501,6 @@ st_write (void)
void void
st_write_done (void) st_write_done (void)
{ {
finalize_transfer (); finalize_transfer ();
/* Deal with endfile conditions associated with sequential files. */ /* Deal with endfile conditions associated with sequential files. */
@ -1590,7 +1571,6 @@ void
st_set_nml_var_int (void * var_addr, char * var_name, int var_name_len, st_set_nml_var_int (void * var_addr, char * var_name, int var_name_len,
int kind) int kind)
{ {
st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_INTEGER, 0); st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_INTEGER, 0);
} }
@ -1598,7 +1578,6 @@ void
st_set_nml_var_float (void * var_addr, char * var_name, int var_name_len, st_set_nml_var_float (void * var_addr, char * var_name, int var_name_len,
int kind) int kind)
{ {
st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_REAL, 0); st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_REAL, 0);
} }
@ -1606,7 +1585,6 @@ void
st_set_nml_var_char (void * var_addr, char * var_name, int var_name_len, st_set_nml_var_char (void * var_addr, char * var_name, int var_name_len,
int kind, gfc_charlen_type string_length) int kind, gfc_charlen_type string_length)
{ {
st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_CHARACTER, st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_CHARACTER,
string_length); string_length);
} }
@ -1615,7 +1593,6 @@ void
st_set_nml_var_complex (void * var_addr, char * var_name, int var_name_len, st_set_nml_var_complex (void * var_addr, char * var_name, int var_name_len,
int kind) int kind)
{ {
st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_COMPLEX, 0); st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_COMPLEX, 0);
} }
@ -1623,7 +1600,5 @@ void
st_set_nml_var_log (void * var_addr, char * var_name, int var_name_len, st_set_nml_var_log (void * var_addr, char * var_name, int var_name_len,
int kind) int kind)
{ {
st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_LOGICAL, 0); st_set_nml_var (var_addr, var_name, var_name_len, kind, BT_LOGICAL, 0);
} }

View File

@ -182,7 +182,7 @@ fix_fd (int fd)
input = output = error = 0; input = output = error = 0;
/* Unix allocates the lowest descriptors first, so a loop is not /* Unix allocates the lowest descriptors first, so a loop is not
* required, but this order is. */ required, but this order is. */
if (fd == STDIN_FILENO) if (fd == STDIN_FILENO)
{ {
@ -271,7 +271,6 @@ readn (int fd, char *buffer, int len)
const char * const char *
get_oserror (void) get_oserror (void)
{ {
return strerror (errno); return strerror (errno);
} }
@ -281,7 +280,6 @@ get_oserror (void)
void void
sys_exit (int code) sys_exit (int code)
{ {
exit (code); exit (code);
} }
@ -295,7 +293,6 @@ sys_exit (int code)
static try static try
fd_flush (unix_stream * s) fd_flush (unix_stream * s)
{ {
if (s->ndirty == 0) if (s->ndirty == 0)
return SUCCESS;; return SUCCESS;;
@ -476,7 +473,6 @@ fd_alloc_w_at (unix_stream * s, int *len, gfc_offset where)
static try static try
fd_sfree (unix_stream * s) fd_sfree (unix_stream * s)
{ {
if (s->ndirty != 0 && if (s->ndirty != 0 &&
(s->buffer != s->small_buffer || options.all_unbuffered || (s->buffer != s->small_buffer || options.all_unbuffered ||
s->unbuffered)) s->unbuffered))
@ -489,7 +485,6 @@ fd_sfree (unix_stream * s)
static int static int
fd_seek (unix_stream * s, gfc_offset offset) fd_seek (unix_stream * s, gfc_offset offset)
{ {
s->physical_offset = s->logical_offset = offset; s->physical_offset = s->logical_offset = offset;
return (lseek (s->fd, offset, SEEK_SET) < 0) ? FAILURE : SUCCESS; return (lseek (s->fd, offset, SEEK_SET) < 0) ? FAILURE : SUCCESS;
@ -503,7 +498,6 @@ fd_seek (unix_stream * s, gfc_offset offset)
static try static try
fd_truncate (unix_stream * s) fd_truncate (unix_stream * s)
{ {
if (lseek (s->fd, s->logical_offset, SEEK_SET) == -1) if (lseek (s->fd, s->logical_offset, SEEK_SET) == -1)
return FAILURE; return FAILURE;
@ -511,9 +505,7 @@ fd_truncate (unix_stream * s)
the fd is a regular file at this point */ the fd is a regular file at this point */
if (ftruncate (s->fd, s->logical_offset)) if (ftruncate (s->fd, s->logical_offset))
{
return FAILURE; return FAILURE;
}
s->physical_offset = s->file_length = s->logical_offset; s->physical_offset = s->file_length = s->logical_offset;
@ -524,7 +516,6 @@ fd_truncate (unix_stream * s)
static try static try
fd_close (unix_stream * s) fd_close (unix_stream * s)
{ {
if (fd_flush (s) == FAILURE) if (fd_flush (s) == FAILURE)
return FAILURE; return FAILURE;
@ -543,7 +534,6 @@ fd_close (unix_stream * s)
static void static void
fd_open (unix_stream * s) fd_open (unix_stream * s)
{ {
if (isatty (s->fd)) if (isatty (s->fd))
s->unbuffered = 1; s->unbuffered = 1;
@ -578,7 +568,6 @@ static int page_size, page_mask;
static try static try
mmap_flush (unix_stream * s) mmap_flush (unix_stream * s)
{ {
if (!s->mmaped) if (!s->mmaped)
return fd_flush (s); return fd_flush (s);
@ -683,7 +672,6 @@ mmap_alloc_w_at (unix_stream * s, int *len, gfc_offset where)
static int static int
mmap_seek (unix_stream * s, gfc_offset offset) mmap_seek (unix_stream * s, gfc_offset offset)
{ {
s->logical_offset = offset; s->logical_offset = offset;
return SUCCESS; return SUCCESS;
} }
@ -707,7 +695,6 @@ mmap_close (unix_stream * s)
static try static try
mmap_sfree (unix_stream * s) mmap_sfree (unix_stream * s)
{ {
return SUCCESS; return SUCCESS;
} }
@ -810,7 +797,6 @@ mem_alloc_w_at (unix_stream * s, int *len, gfc_offset where)
static int static int
mem_seek (unix_stream * s, gfc_offset offset) mem_seek (unix_stream * s, gfc_offset offset)
{ {
if (offset > s->file_length) if (offset > s->file_length)
{ {
errno = ESPIPE; errno = ESPIPE;
@ -825,7 +811,6 @@ mem_seek (unix_stream * s, gfc_offset offset)
static int static int
mem_truncate (unix_stream * s) mem_truncate (unix_stream * s)
{ {
return SUCCESS; return SUCCESS;
} }
@ -842,7 +827,6 @@ mem_close (unix_stream * s)
static try static try
mem_sfree (unix_stream * s) mem_sfree (unix_stream * s)
{ {
return SUCCESS; return SUCCESS;
} }
@ -925,7 +909,6 @@ fd_to_stream (int fd, int prot)
int int
unit_to_fd(int unit) unit_to_fd(int unit)
{ {
gfc_unit *us; gfc_unit *us;
us = find_unit(unit); us = find_unit(unit);
@ -943,7 +926,6 @@ unit_to_fd(int unit)
static int static int
unpack_filename (char *cstring, const char *fstring, int len) unpack_filename (char *cstring, const char *fstring, int len)
{ {
len = fstrlen (fstring, len); len = fstrlen (fstring, len);
if (len >= PATH_MAX) if (len >= PATH_MAX)
return 1; return 1;
@ -1065,7 +1047,7 @@ regular_file (unit_action action, unit_status status)
internal_error ("regular_file(): Bad status"); internal_error ("regular_file(): Bad status");
} }
// mode |= O_LARGEFILE; /* mode |= O_LARGEFILE; */
return open (path, mode, return open (path, mode,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
@ -1121,7 +1103,6 @@ open_external (unit_action action, unit_status status)
stream * stream *
input_stream (void) input_stream (void)
{ {
return fd_to_stream (STDIN_FILENO, PROT_READ); return fd_to_stream (STDIN_FILENO, PROT_READ);
} }
@ -1132,7 +1113,6 @@ input_stream (void)
stream * stream *
output_stream (void) output_stream (void)
{ {
return fd_to_stream (STDOUT_FILENO, PROT_WRITE); return fd_to_stream (STDOUT_FILENO, PROT_WRITE);
} }
@ -1386,7 +1366,6 @@ inquire_formatted (const char *string, int len)
const char * const char *
inquire_unformatted (const char *string, int len) inquire_unformatted (const char *string, int len)
{ {
return inquire_formatted (string, len); return inquire_formatted (string, len);
} }
@ -1413,7 +1392,6 @@ inquire_access (const char *string, int len, int mode)
const char * const char *
inquire_read (const char *string, int len) inquire_read (const char *string, int len)
{ {
return inquire_access (string, len, R_OK); return inquire_access (string, len, R_OK);
} }
@ -1424,7 +1402,6 @@ inquire_read (const char *string, int len)
const char * const char *
inquire_write (const char *string, int len) inquire_write (const char *string, int len)
{ {
return inquire_access (string, len, W_OK); return inquire_access (string, len, W_OK);
} }
@ -1435,7 +1412,6 @@ inquire_write (const char *string, int len)
const char * const char *
inquire_readwrite (const char *string, int len) inquire_readwrite (const char *string, int len)
{ {
return inquire_access (string, len, R_OK | W_OK); return inquire_access (string, len, R_OK | W_OK);
} }
@ -1445,7 +1421,6 @@ inquire_readwrite (const char *string, int len)
gfc_offset gfc_offset
file_length (stream * s) file_length (stream * s)
{ {
return ((unix_stream *) s)->file_length; return ((unix_stream *) s)->file_length;
} }
@ -1455,7 +1430,6 @@ file_length (stream * s)
gfc_offset gfc_offset
file_position (stream * s) file_position (stream * s)
{ {
return ((unix_stream *) s)->logical_offset; return ((unix_stream *) s)->logical_offset;
} }

View File

@ -928,7 +928,6 @@ btoa (uint64_t n)
void void
write_i (fnode * f, const char *p, int len) write_i (fnode * f, const char *p, int len)
{ {
write_decimal (f, p, len, (void *) itoa); write_decimal (f, p, len, (void *) itoa);
} }
@ -936,7 +935,6 @@ write_i (fnode * f, const char *p, int len)
void void
write_b (fnode * f, const char *p, int len) write_b (fnode * f, const char *p, int len)
{ {
write_int (f, p, len, btoa); write_int (f, p, len, btoa);
} }
@ -944,14 +942,12 @@ write_b (fnode * f, const char *p, int len)
void void
write_o (fnode * f, const char *p, int len) write_o (fnode * f, const char *p, int len)
{ {
write_int (f, p, len, otoa); write_int (f, p, len, otoa);
} }
void void
write_z (fnode * f, const char *p, int len) write_z (fnode * f, const char *p, int len)
{ {
write_int (f, p, len, xtoa); write_int (f, p, len, xtoa);
} }
@ -959,7 +955,6 @@ write_z (fnode * f, const char *p, int len)
void void
write_d (fnode *f, const char *p, int len) write_d (fnode *f, const char *p, int len)
{ {
write_float (f, p, len); write_float (f, p, len);
} }
@ -967,7 +962,6 @@ write_d (fnode *f, const char *p, int len)
void void
write_e (fnode *f, const char *p, int len) write_e (fnode *f, const char *p, int len)
{ {
write_float (f, p, len); write_float (f, p, len);
} }
@ -975,7 +969,6 @@ write_e (fnode *f, const char *p, int len)
void void
write_f (fnode *f, const char *p, int len) write_f (fnode *f, const char *p, int len)
{ {
write_float (f, p, len); write_float (f, p, len);
} }
@ -983,7 +976,6 @@ write_f (fnode *f, const char *p, int len)
void void
write_en (fnode *f, const char *p, int len) write_en (fnode *f, const char *p, int len)
{ {
write_float (f, p, len); write_float (f, p, len);
} }
@ -991,7 +983,6 @@ write_en (fnode *f, const char *p, int len)
void void
write_es (fnode *f, const char *p, int len) write_es (fnode *f, const char *p, int len)
{ {
write_float (f, p, len); write_float (f, p, len);
} }
@ -1172,7 +1163,6 @@ write_real (const char *source, int length)
static void static void
write_complex (const char *source, int len) write_complex (const char *source, int len)
{ {
if (write_char ('(')) if (write_char ('('))
return; return;
write_real (source, len); write_real (source, len);

View File

@ -79,7 +79,6 @@ print_spaces (int n)
static const char * static const char *
var_source (variable * v) var_source (variable * v)
{ {
if (getenv (v->name) == NULL) if (getenv (v->name) == NULL)
return "Default"; return "Default";
@ -122,7 +121,6 @@ set_default:
static void static void
show_integer (variable * v) show_integer (variable * v)
{ {
st_printf ("%s %d\n", var_source (v), *v->var); st_printf ("%s %d\n", var_source (v), *v->var);
} }
@ -164,7 +162,6 @@ set_default:
static void static void
show_boolean (variable * v) show_boolean (variable * v)
{ {
st_printf ("%s %s\n", var_source (v), *v->var ? "Yes" : "No"); st_printf ("%s %s\n", var_source (v), *v->var ? "Yes" : "No");
} }
@ -288,7 +285,6 @@ set_default:
static void static void
show_sep (variable * v) show_sep (variable * v)
{ {
st_printf ("%s \"%s\"\n", var_source (v), options.separator); st_printf ("%s \"%s\"\n", var_source (v), options.separator);
} }
@ -330,31 +326,21 @@ static choice rounding[] = {
{"DOWN", FP_ROUND_DOWN}, {"DOWN", FP_ROUND_DOWN},
{"ZERO", FP_ROUND_ZERO}, {"ZERO", FP_ROUND_ZERO},
{NULL} {NULL}
}, precision[] = };
{
{
"24", 1}
,
{
"53", 2}
,
{
"64", 0}
,
{
NULL}
}
, signal_choices[] = static choice precision[] =
{ {
{ "24", 1},
{ "53", 2},
{ "64", 0},
{ NULL}
};
static choice signal_choices[] =
{ {
"IGNORE", 1} { "IGNORE", 1},
, { "ABORT", 0},
{ { NULL}
"ABORT", 0}
,
{
NULL}
}; };
@ -388,7 +374,6 @@ set_default:
static void static void
show_choice (variable * v, choice * c) show_choice (variable * v, choice * c)
{ {
st_printf ("%s ", var_source (v)); st_printf ("%s ", var_source (v));
for (; c->name; c++) for (; c->name; c++)
@ -399,7 +384,6 @@ show_choice (variable * v, choice * c)
st_printf ("%s\n", c->name); st_printf ("%s\n", c->name);
else else
st_printf ("(Unknown)\n"); st_printf ("(Unknown)\n");
} }
@ -408,6 +392,7 @@ init_round (variable * v)
{ {
init_choice (v, rounding); init_choice (v, rounding);
} }
static void static void
show_round (variable * v) show_round (variable * v)
{ {
@ -419,6 +404,7 @@ init_precision (variable * v)
{ {
init_choice (v, precision); init_choice (v, precision);
} }
static void static void
show_precision (variable * v) show_precision (variable * v)
{ {
@ -430,6 +416,7 @@ init_signal (variable * v)
{ {
init_choice (v, signal_choices); init_choice (v, signal_choices);
} }
static void static void
show_signal (variable * v) show_signal (variable * v)
{ {
@ -615,6 +602,7 @@ show_variables (void)
char *p, **e; char *p, **e;
variable *v; variable *v;
int n; int n;
/* TODO: print version number. */ /* TODO: print version number. */
st_printf ("GNU Fortran 95 runtime library version " st_printf ("GNU Fortran 95 runtime library version "
"UNKNOWN" "\n\n"); "UNKNOWN" "\n\n");

View File

@ -281,7 +281,6 @@ st_sprintf (char *buffer, const char *format, ...)
void void
show_locus (void) show_locus (void)
{ {
if (!options.locus || filename == NULL) if (!options.locus || filename == NULL)
return; return;
@ -300,8 +299,9 @@ recursion_check (void)
{ {
static int magic = 0; static int magic = 0;
/* Don't even try to print something at this point */
if (magic == MAGIC) if (magic == MAGIC)
sys_exit (4); /* Don't even try to print something at this point */ sys_exit (4);
magic = MAGIC; magic = MAGIC;
} }
@ -314,12 +314,9 @@ recursion_check (void)
void void
os_error (const char *message) os_error (const char *message)
{ {
recursion_check (); recursion_check ();
show_locus (); show_locus ();
st_printf ("Operating system error: %s\n%s\n", get_oserror (), message); st_printf ("Operating system error: %s\n%s\n", get_oserror (), message);
sys_exit (1); sys_exit (1);
} }
@ -330,12 +327,9 @@ os_error (const char *message)
void void
runtime_error (const char *message) runtime_error (const char *message)
{ {
recursion_check (); recursion_check ();
show_locus (); show_locus ();
st_printf ("Fortran runtime error: %s\n", message); st_printf ("Fortran runtime error: %s\n", message);
sys_exit (2); sys_exit (2);
} }
@ -346,9 +340,7 @@ runtime_error (const char *message)
void void
internal_error (const char *message) internal_error (const char *message)
{ {
recursion_check (); recursion_check ();
show_locus (); show_locus ();
st_printf ("Internal Error: %s\n", message); st_printf ("Internal Error: %s\n", message);
sys_exit (3); sys_exit (3);

View File

@ -120,4 +120,3 @@ internal_pack (gfc_array_char * source)
} }
return destptr; return destptr;
} }

View File

@ -117,4 +117,3 @@ internal_unpack (gfc_array_char * d, const void * s)
} }
} }
} }

View File

@ -71,7 +71,6 @@ set_args (int argc, char **argv)
void void
get_args (int *argc, char ***argv) get_args (int *argc, char ***argv)
{ {
*argc = argc_save; *argc = argc_save;
*argv = argv_save; *argv = argv_save;
} }
@ -112,4 +111,3 @@ cleanup ()
{ {
close_units (); close_units ();
} }

View File

@ -65,7 +65,6 @@ static malloc_t mem_root;
void void
memory_init (void) memory_init (void)
{ {
/* The root should never be used directly, so don't set the magic. */ /* The root should never be used directly, so don't set the magic. */
mem_root.magic = 0; mem_root.magic = 0;
mem_root.next = &mem_root; mem_root.next = &mem_root;
@ -111,7 +110,6 @@ get_mem (size_t n)
void void
free_mem (void *p) free_mem (void *p)
{ {
free (p); free (p);
} }
@ -250,7 +248,6 @@ allocate_size (void **mem, size_t size, GFC_INTEGER_4 * stat)
void void
allocate (void **mem, GFC_INTEGER_4 size, GFC_INTEGER_4 * stat) allocate (void **mem, GFC_INTEGER_4 size, GFC_INTEGER_4 * stat)
{ {
if (size < 0) if (size < 0)
{ {
runtime_error ("Attempt to allocate negative amount of memory. " runtime_error ("Attempt to allocate negative amount of memory. "
@ -265,7 +262,6 @@ allocate (void **mem, GFC_INTEGER_4 size, GFC_INTEGER_4 * stat)
void void
allocate64 (void **mem, GFC_INTEGER_8 size, GFC_INTEGER_4 * stat) allocate64 (void **mem, GFC_INTEGER_8 size, GFC_INTEGER_4 * stat)
{ {
if (size < 0) if (size < 0)
{ {
runtime_error runtime_error
@ -283,7 +279,6 @@ allocate64 (void **mem, GFC_INTEGER_8 size, GFC_INTEGER_4 * stat)
void void
deallocate (void **mem, GFC_INTEGER_4 * stat) deallocate (void **mem, GFC_INTEGER_4 * stat)
{ {
if (!mem) if (!mem)
runtime_error ("Internal: NULL mem pointer in ALLOCATE."); runtime_error ("Internal: NULL mem pointer in ALLOCATE.");
@ -309,4 +304,3 @@ deallocate (void **mem, GFC_INTEGER_4 * stat)
if (stat) if (stat)
*stat = 0; *stat = 0;
} }

View File

@ -68,4 +68,3 @@ pause_string (char *string, GFC_INTEGER_4 len)
do_pause (); do_pause ();
} }

View File

@ -53,4 +53,3 @@ stop_string (const char *string, GFC_INTEGER_4 len)
sys_exit (0); sys_exit (0);
} }

View File

@ -51,7 +51,6 @@ compare0 (const char *s1, int s1_len, const char *s2)
int int
fstrlen (const char *string, int len) fstrlen (const char *string, int len)
{ {
for (len--; len >= 0; len--) for (len--; len >= 0; len--)
if (string[len] != ' ') if (string[len] != ' ')
break; break;
@ -60,11 +59,9 @@ fstrlen (const char *string, int len)
} }
void void
fstrcpy (char *dest, int destlen, const char *src, int srclen) fstrcpy (char *dest, int destlen, const char *src, int srclen)
{ {
if (srclen >= destlen) if (srclen >= destlen)
{ {
/* This will truncate if too long. */ /* This will truncate if too long. */
@ -108,7 +105,6 @@ int
find_option (const char *s1, int s1_len, st_option * opts, find_option (const char *s1, int s1_len, st_option * opts,
const char *error_message) const char *error_message)
{ {
for (; opts->name; opts++) for (; opts->name; opts++)
if (compare0 (s1, s1_len, opts->name)) if (compare0 (s1, s1_len, opts->name))
return opts->value; return opts->value;
@ -117,4 +113,3 @@ find_option (const char *s1, int s1_len, st_option * opts,
return -1; return -1;
} }