Commit 7fcb1804 by Tobias Schlüter

io.h, [...]: Fix formatting issues, update copyright years.

* io/io.h, io/list_read.c, io/open.c, io/transfer.c, io/write.c:
Fix formatting issues, update copyright years.

From-SVN: r86425
parent b3d1f5b4
/* Copyright (C) 2002-2003 Free Software Foundation, Inc. /* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Andy Vaught Contributed by Andy Vaught
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
......
/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
/* Copyright (C) 2002-2003 Free Software Foundation, Inc.
Contributed by Andy Vaught Contributed by Andy Vaught
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
...@@ -134,10 +133,10 @@ static st_option access_opt[] = { ...@@ -134,10 +133,10 @@ static st_option access_opt[] = {
}; };
/* test_endfile()-- Given a unit, test to see if the file is /* Given a unit, test to see if the file is positioned at the terminal
* positioned at the terminal point, and if so, change state from point, and if so, change state from NO_ENDFILE flag to AT_ENDFILE.
* NO_ENDFILE flag to AT_ENDFILE. This prevents us from changing the This prevents us from changing the state from AFTER_ENDFILE to
* state from AFTER_ENDFILE to AT_ENDFILE. */ AT_ENDFILE. */
void void
test_endfile (gfc_unit * u) test_endfile (gfc_unit * u)
...@@ -148,14 +147,14 @@ test_endfile (gfc_unit * u) ...@@ -148,14 +147,14 @@ test_endfile (gfc_unit * u)
} }
/* edit_modes()-- Change the modes of a file, those that are allowed /* Change the modes of a file, those that are allowed * to be
* to be changed. */ changed. */
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 &&
u->flags.status != flags->position) u->flags.status != flags->position)
...@@ -178,7 +177,7 @@ edit_modes (gfc_unit * u, unit_flags * flags) ...@@ -178,7 +177,7 @@ edit_modes (gfc_unit * u, unit_flags * flags)
generate_error (ERROR_BAD_OPTION, generate_error (ERROR_BAD_OPTION,
"Cannot change ACTION parameter in OPEN statement"); "Cannot change ACTION parameter in OPEN statement");
/* Status must be OLD if present */ /* Status must be OLD if present. */
if (flags->status != STATUS_UNSPECIFIED && flags->status != STATUS_OLD) if (flags->status != STATUS_UNSPECIFIED && flags->status != STATUS_OLD)
generate_error (ERROR_BAD_OPTION, generate_error (ERROR_BAD_OPTION,
...@@ -203,7 +202,8 @@ edit_modes (gfc_unit * u, unit_flags * flags) ...@@ -203,7 +202,8 @@ edit_modes (gfc_unit * u, unit_flags * flags)
} }
if (ioparm.library_return == LIBRARY_OK) if (ioparm.library_return == LIBRARY_OK)
{ /* Change the changeable */ {
/* Change the changeable: */
if (flags->blank != BLANK_UNSPECIFIED) if (flags->blank != BLANK_UNSPECIFIED)
u->flags.blank = flags->blank; u->flags.blank = flags->blank;
if (flags->delim != DELIM_UNSPECIFIED) if (flags->delim != DELIM_UNSPECIFIED)
...@@ -227,7 +227,7 @@ edit_modes (gfc_unit * u, unit_flags * flags) ...@@ -227,7 +227,7 @@ edit_modes (gfc_unit * u, unit_flags * flags)
u->current_record = 0; u->current_record = 0;
u->last_record = 0; u->last_record = 0;
test_endfile (u); /* We might be at the end */ test_endfile (u); /* We might be at the end. */
break; break;
case POSITION_APPEND: case POSITION_APPEND:
...@@ -235,7 +235,7 @@ edit_modes (gfc_unit * u, unit_flags * flags) ...@@ -235,7 +235,7 @@ edit_modes (gfc_unit * u, unit_flags * flags)
goto seek_error; goto seek_error;
u->current_record = 0; u->current_record = 0;
u->endfile = AT_ENDFILE; /* We are at the end */ u->endfile = AT_ENDFILE; /* We are at the end. */
break; break;
seek_error: seek_error:
...@@ -245,7 +245,7 @@ edit_modes (gfc_unit * u, unit_flags * flags) ...@@ -245,7 +245,7 @@ edit_modes (gfc_unit * u, unit_flags * flags)
} }
/* new_unit()-- Open an unused unit */ /* Open an unused unit. */
void void
new_unit (unit_flags * flags) new_unit (unit_flags * flags)
...@@ -254,13 +254,13 @@ new_unit (unit_flags * flags) ...@@ -254,13 +254,13 @@ new_unit (unit_flags * flags)
stream *s; stream *s;
char tmpname[5 /* fort. */ + 10 /* digits of unit number */ + 1 /* 0 */]; char tmpname[5 /* fort. */ + 10 /* digits of unit number */ + 1 /* 0 */];
/* Change unspecifieds to defaults */ /* Change unspecifieds to defaults. */
if (flags->access == ACCESS_UNSPECIFIED) if (flags->access == ACCESS_UNSPECIFIED)
flags->access = ACCESS_SEQUENTIAL; flags->access = ACCESS_SEQUENTIAL;
if (flags->action == ACTION_UNSPECIFIED) if (flags->action == ACTION_UNSPECIFIED)
flags->action = ACTION_READWRITE; /* Processor dependent */ flags->action = ACTION_READWRITE; /* Processor dependent. */
if (flags->form == FORM_UNSPECIFIED) if (flags->form == FORM_UNSPECIFIED)
flags->form = (flags->access == ACCESS_SEQUENTIAL) flags->form = (flags->access == ACCESS_SEQUENTIAL)
...@@ -321,7 +321,7 @@ new_unit (unit_flags * flags) ...@@ -321,7 +321,7 @@ new_unit (unit_flags * flags)
if (flags->status == STATUS_UNSPECIFIED) if (flags->status == STATUS_UNSPECIFIED)
flags->status = STATUS_UNKNOWN; flags->status = STATUS_UNKNOWN;
/* Checks */ /* Checks. */
if (flags->access == ACCESS_DIRECT && ioparm.recl_in == 0) if (flags->access == ACCESS_DIRECT && ioparm.recl_in == 0)
{ {
...@@ -362,7 +362,7 @@ new_unit (unit_flags * flags) ...@@ -362,7 +362,7 @@ new_unit (unit_flags * flags)
internal_error ("new_unit(): Bad status"); internal_error ("new_unit(): Bad status");
} }
/* Make sure the file isn't already open someplace else */ /* Make sure the file isn't already open someplace else. */
if (find_file () != NULL) if (find_file () != NULL)
{ {
...@@ -370,7 +370,7 @@ new_unit (unit_flags * flags) ...@@ -370,7 +370,7 @@ new_unit (unit_flags * flags)
goto cleanup; goto cleanup;
} }
/* Open file */ /* Open file. */
s = open_external (flags->action, flags->status); s = open_external (flags->action, flags->status);
if (s == NULL) if (s == NULL)
...@@ -382,7 +382,7 @@ new_unit (unit_flags * flags) ...@@ -382,7 +382,7 @@ new_unit (unit_flags * flags)
if (flags->status == STATUS_NEW || flags->status == STATUS_REPLACE) if (flags->status == STATUS_NEW || flags->status == STATUS_REPLACE)
flags->status = STATUS_OLD; flags->status = STATUS_OLD;
/* Create the unit structure */ /* Create the unit structure. */
u = get_mem (sizeof (gfc_unit) + ioparm.file_len); u = get_mem (sizeof (gfc_unit) + ioparm.file_len);
...@@ -390,15 +390,15 @@ new_unit (unit_flags * flags) ...@@ -390,15 +390,15 @@ new_unit (unit_flags * flags)
u->s = s; u->s = s;
u->flags = *flags; u->flags = *flags;
/* Unspecified recl ends up with a processor dependent value */ /* Unspecified recl ends up with a processor dependent value. */
u->recl = (ioparm.recl_in != 0) ? ioparm.recl_in : DEFAULT_RECL; u->recl = (ioparm.recl_in != 0) ? ioparm.recl_in : DEFAULT_RECL;
u->last_record = 0; u->last_record = 0;
u->current_record = 0; u->current_record = 0;
/* If the file is direct access, calculate the maximum record number /* If the file is direct access, calculate the maximum record number
* via a division now instead of letting the multiplication overflow via a division now instead of letting the multiplication overflow
* later. */ later. */
if (flags->access == ACCESS_DIRECT) if (flags->access == ACCESS_DIRECT)
u->maxrec = g.max_offset / u->recl; u->maxrec = g.max_offset / u->recl;
...@@ -409,25 +409,24 @@ new_unit (unit_flags * flags) ...@@ -409,25 +409,24 @@ new_unit (unit_flags * flags)
insert_unit (u); insert_unit (u);
/* The file is now connected. Errors after this point leave the /* The file is now connected. Errors after this point leave the
* file connected. Curiously, the standard requires that the file connected. Curiously, the standard requires that the
* position specifier be ignored for new files so a newly connected position specifier be ignored for new files so a newly connected
* file starts out that the initial point. We still need to figure file starts out that the initial point. We still need to figure
* out if the file is at the end or not. */ out if the file is at the end or not. */
test_endfile (u); test_endfile (u);
cleanup: cleanup:
/* Free memory associated with a temporary filename */ /* Free memory associated with a temporary filename. */
if (flags->status == STATUS_SCRATCH) if (flags->status == STATUS_SCRATCH)
free_mem (ioparm.file); free_mem (ioparm.file);
} }
/* already_open()-- Open a unit which is already open. This involves /* Open a unit which is already open. This involves changing the
* changing the modes or closing what is there now and opening the new modes or closing what is there now and opening the new file. */
* file. */
static void static void
already_open (gfc_unit * u, unit_flags * flags) already_open (gfc_unit * u, unit_flags * flags)
...@@ -440,7 +439,7 @@ already_open (gfc_unit * u, unit_flags * flags) ...@@ -440,7 +439,7 @@ already_open (gfc_unit * u, unit_flags * flags)
} }
/* If the file is connected to something else, close it and open a /* If the file is connected to something else, close it and open a
* new unit */ new unit. */
if (!compare_file_filename (u->s, ioparm.file, ioparm.file_len)) if (!compare_file_filename (u->s, ioparm.file, ioparm.file_len))
{ {
...@@ -458,8 +457,7 @@ already_open (gfc_unit * u, unit_flags * flags) ...@@ -458,8 +457,7 @@ already_open (gfc_unit * u, unit_flags * flags)
} }
/*************/ /* Open file. */
/* open file */
void void
st_open (void) st_open (void)
...@@ -469,7 +467,7 @@ st_open (void) ...@@ -469,7 +467,7 @@ st_open (void)
library_start (); library_start ();
/* Decode options */ /* Decode options. */
flags.access = (ioparm.access == NULL) ? ACCESS_UNSPECIFIED : flags.access = (ioparm.access == NULL) ? ACCESS_UNSPECIFIED :
find_option (ioparm.access, ioparm.access_len, access_opt, find_option (ioparm.access, ioparm.access_len, access_opt,
......
/* Copyright (C) 2002-2003 Free Software Foundation, Inc. /* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Andy Vaught Contributed by Andy Vaught
This file is part of the GNU Fortran 95 runtime library (libgfortran). This file is part of the GNU Fortran 95 runtime library (libgfortran).
...@@ -104,9 +104,8 @@ extract_real (const void *p, int len) ...@@ -104,9 +104,8 @@ extract_real (const void *p, int len)
} }
/* calculate sign()-- Given a flag that indicate if a value is /* Given a flag that indicate if a value is negative or not, return a
* negative or not, return a sign_t that gives the sign that we need sign_t that gives the sign that we need to produce. */
* to produce. */
static sign_t static sign_t
calculate_sign (int negative_flag) calculate_sign (int negative_flag)
...@@ -133,7 +132,7 @@ calculate_sign (int negative_flag) ...@@ -133,7 +132,7 @@ calculate_sign (int negative_flag)
} }
/* calculate_exp()-- returns the value of 10**d. */ /* Returns the value of 10**d. */
static double static double
calculate_exp (int d) calculate_exp (int d)
...@@ -150,8 +149,7 @@ calculate_exp (int d) ...@@ -150,8 +149,7 @@ calculate_exp (int d)
} }
/* calculate_G_format()-- geneate corresponding I/O format for /* Generate corresponding I/O format for FMT_G output.
FMT_G output.
The rules to translate FMT_G to FMT_E or FNT_F from DEC fortran The rules to translate FMT_G to FMT_E or FNT_F from DEC fortran
LRM (table 11-2, Chapter 11, "I/O Formatting", P11-25) is: LRM (table 11-2, Chapter 11, "I/O Formatting", P11-25) is:
...@@ -252,8 +250,7 @@ calculate_G_format (fnode *f, double value, int len, int *num_blank) ...@@ -252,8 +250,7 @@ calculate_G_format (fnode *f, double value, int len, int *num_blank)
} }
/* output_float() -- output a real number according to its format /* Output a real number according to its format which is FMT_G free. */
which is FMT_G free */
static void static void
output_float (fnode *f, double value, int len) output_float (fnode *f, double value, int len)
...@@ -275,17 +272,17 @@ output_float (fnode *f, double value, int len) ...@@ -275,17 +272,17 @@ output_float (fnode *f, double value, int len)
int intval = 0, intlen = 0; int intval = 0, intlen = 0;
int j; int j;
/* EXP value for this number */ /* EXP value for this number. */
neval = 0; neval = 0;
/* Width of EXP and it's sign*/ /* Width of EXP and it's sign. */
nesign = 0; nesign = 0;
ft = f->format; ft = f->format;
w = f->u.real.w; w = f->u.real.w;
d = f->u.real.d + 1; d = f->u.real.d + 1;
/* Width of the EXP */ /* Width of the EXP. */
e = 0; e = 0;
sca = g.scale_factor; sca = g.scale_factor;
...@@ -295,7 +292,7 @@ output_float (fnode *f, double value, int len) ...@@ -295,7 +292,7 @@ output_float (fnode *f, double value, int len)
if (n < 0) if (n < 0)
n = -n; n = -n;
/* Width of the sign for the whole number */ /* Width of the sign for the whole number. */
nsign = (sign == SIGN_NONE ? 0 : 1); nsign = (sign == SIGN_NONE ? 0 : 1);
digits = 0; digits = 0;
...@@ -312,8 +309,8 @@ output_float (fnode *f, double value, int len) ...@@ -312,8 +309,8 @@ output_float (fnode *f, double value, int len)
minv = 0.1; minv = 0.1;
maxv = 1.0; maxv = 1.0;
/* Here calculate the new val of the number with consideration /* Calculate the new val of the number with consideration
of Globle Scale value */ of global scale value. */
while (sca > 0) while (sca > 0)
{ {
minv *= 10.0; minv *= 10.0;
...@@ -323,7 +320,7 @@ output_float (fnode *f, double value, int len) ...@@ -323,7 +320,7 @@ output_float (fnode *f, double value, int len)
neval --; neval --;
} }
/* Now calculate the new Exp value for this number */ /* Now calculate the new Exp value for this number. */
sca = g.scale_factor; sca = g.scale_factor;
while(sca >= 1) while(sca >= 1)
{ {
...@@ -343,7 +340,7 @@ output_float (fnode *f, double value, int len) ...@@ -343,7 +340,7 @@ output_float (fnode *f, double value, int len)
maxv = 10.0; maxv = 10.0;
} }
/* OK, let's scale the number to appropriate range */ /* OK, let's scale the number to appropriate range. */
while (scale_flag && n > 0.0 && n < minv) while (scale_flag && n > 0.0 && n < minv)
{ {
if (n < minv) if (n < minv)
...@@ -362,11 +359,10 @@ output_float (fnode *f, double value, int len) ...@@ -362,11 +359,10 @@ output_float (fnode *f, double value, int len)
} }
/* It is time to process the EXP part of the number. /* It is time to process the EXP part of the number.
Value of 'nesign' is 0 unless following codes is executed. Value of 'nesign' is 0 unless following codes is executed. */
*/
if (ft != FMT_F) if (ft != FMT_F)
{ {
/* Sign of the EXP value */ /* Sign of the EXP value. */
if (neval >= 0) if (neval >= 0)
esign = SIGN_PLUS; esign = SIGN_PLUS;
else else
...@@ -375,7 +371,7 @@ output_float (fnode *f, double value, int len) ...@@ -375,7 +371,7 @@ output_float (fnode *f, double value, int len)
neval = - neval ; neval = - neval ;
} }
/* Width of the EXP*/ /* Width of the EXP. */
e_new = 0; e_new = 0;
j = neval; j = neval;
while (j > 0) while (j > 0)
...@@ -386,11 +382,11 @@ output_float (fnode *f, double value, int len) ...@@ -386,11 +382,11 @@ output_float (fnode *f, double value, int len)
if (e <= e_new) if (e <= e_new)
e = e_new; e = e_new;
/* Got the width of EXP */ /* Got the width of EXP. */
if (e < digits) if (e < digits)
e = digits ; e = digits ;
/* Minimum value of the width would be 2 */ /* Minimum value of the width would be 2. */
if (e < 2) if (e < 2)
e = 2; e = 2;
...@@ -424,7 +420,7 @@ output_float (fnode *f, double value, int len) ...@@ -424,7 +420,7 @@ output_float (fnode *f, double value, int len)
nesign -= 1; nesign -= 1;
nblank = w - (nsign + intlen + d + nesign); nblank = w - (nsign + intlen + d + nesign);
} }
/* don't let a leading '0' cause field overflow */ /* Don't let a leading '0' cause field overflow. */
if (nblank == -1 && ft == FMT_F && q[0] == '0') if (nblank == -1 && ft == FMT_F && q[0] == '0')
{ {
q++; q++;
...@@ -497,7 +493,7 @@ write_l (fnode * f, char *source, int len) ...@@ -497,7 +493,7 @@ write_l (fnode * f, char *source, int len)
p[f->u.w - 1] = (n) ? 'T' : 'F'; p[f->u.w - 1] = (n) ? 'T' : 'F';
} }
/* write_float() -- output a real number according to its format */ /* Output a real number according to its format. */
static void static void
write_float (fnode *f, const char *source, int len) write_float (fnode *f, const char *source, int len)
...@@ -579,7 +575,7 @@ write_int (fnode *f, const char *source, int len, char *(*conv) (uint64_t)) ...@@ -579,7 +575,7 @@ write_int (fnode *f, const char *source, int len, char *(*conv) (uint64_t))
n = extract_int (source, len); n = extract_int (source, len);
/* Special case */ /* Special case: */
if (m == 0 && n == 0) if (m == 0 && n == 0)
{ {
...@@ -606,7 +602,7 @@ write_int (fnode *f, const char *source, int len, char *(*conv) (uint64_t)) ...@@ -606,7 +602,7 @@ write_int (fnode *f, const char *source, int len, char *(*conv) (uint64_t))
digits = strlen (q); digits = strlen (q);
/* Select a width if none was specified. The idea here is to always /* Select a width if none was specified. The idea here is to always
* print something. */ print something. */
if (w == 0) if (w == 0)
w = ((digits < m) ? m : digits); w = ((digits < m) ? m : digits);
...@@ -619,7 +615,7 @@ write_int (fnode *f, const char *source, int len, char *(*conv) (uint64_t)) ...@@ -619,7 +615,7 @@ write_int (fnode *f, const char *source, int len, char *(*conv) (uint64_t))
if (digits < m) if (digits < m)
nzero = m - digits; nzero = m - digits;
/* See if things will work */ /* See if things will work. */
nblank = w - (nzero + digits); nblank = w - (nzero + digits);
...@@ -654,7 +650,7 @@ write_decimal (fnode *f, const char *source, int len, char *(*conv) (int64_t)) ...@@ -654,7 +650,7 @@ write_decimal (fnode *f, const char *source, int len, char *(*conv) (int64_t))
n = extract_int (source, len); n = extract_int (source, len);
/* Special case */ /* Special case: */
if (m == 0 && n == 0) if (m == 0 && n == 0)
{ {
...@@ -679,7 +675,7 @@ write_decimal (fnode *f, const char *source, int len, char *(*conv) (int64_t)) ...@@ -679,7 +675,7 @@ write_decimal (fnode *f, const char *source, int len, char *(*conv) (int64_t))
digits = strlen (q); digits = strlen (q);
/* Select a width if none was specified. The idea here is to always /* Select a width if none was specified. The idea here is to always
* print something. */ print something. */
if (w == 0) if (w == 0)
w = ((digits < m) ? m : digits) + nsign; w = ((digits < m) ? m : digits) + nsign;
...@@ -692,7 +688,7 @@ write_decimal (fnode *f, const char *source, int len, char *(*conv) (int64_t)) ...@@ -692,7 +688,7 @@ write_decimal (fnode *f, const char *source, int len, char *(*conv) (int64_t))
if (digits < m) if (digits < m)
nzero = m - digits; nzero = m - digits;
/* See if things will work */ /* See if things will work. */
nblank = w - (nsign + nzero + digits); nblank = w - (nsign + nzero + digits);
...@@ -727,7 +723,7 @@ done: ...@@ -727,7 +723,7 @@ done:
} }
/* otoa()-- Convert unsigned octal to ascii */ /* Convert unsigned octal to ascii. */
static char * static char *
otoa (uint64_t n) otoa (uint64_t n)
...@@ -755,7 +751,7 @@ otoa (uint64_t n) ...@@ -755,7 +751,7 @@ otoa (uint64_t n)
} }
/* btoa()-- Convert unsigned binary to ascii */ /* Convert unsigned binary to ascii. */
static char * static char *
btoa (uint64_t n) btoa (uint64_t n)
...@@ -816,6 +812,7 @@ write_z (fnode * f, const char *p, int len) ...@@ -816,6 +812,7 @@ 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);
} }
...@@ -823,6 +820,7 @@ write_d (fnode *f, const char *p, int len) ...@@ -823,6 +820,7 @@ 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);
} }
...@@ -830,6 +828,7 @@ write_e (fnode *f, const char *p, int len) ...@@ -830,6 +828,7 @@ 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);
} }
...@@ -837,6 +836,7 @@ write_f (fnode *f, const char *p, int len) ...@@ -837,6 +836,7 @@ 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);
} }
...@@ -844,11 +844,12 @@ write_en (fnode *f, const char *p, int len) ...@@ -844,11 +844,12 @@ 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);
} }
/* write_x()-- Take care of the X/TR descriptor */ /* Take care of the X/TR descriptor. */
void void
write_x (fnode * f) write_x (fnode * f)
...@@ -863,11 +864,11 @@ write_x (fnode * f) ...@@ -863,11 +864,11 @@ write_x (fnode * f)
} }
/* List-directed writing */ /* List-directed writing. */
/* write_char()-- Write a single character to the output. Returns /* Write a single character to the output. Returns nonzero if
* nonzero if something goes wrong. */ something goes wrong. */
static int static int
write_char (char c) write_char (char c)
...@@ -884,7 +885,7 @@ write_char (char c) ...@@ -884,7 +885,7 @@ write_char (char c)
} }
/* write_logical()-- Write a list-directed logical value */ /* Write a list-directed logical value. */
static void static void
write_logical (const char *source, int length) write_logical (const char *source, int length)
...@@ -893,7 +894,7 @@ write_logical (const char *source, int length) ...@@ -893,7 +894,7 @@ write_logical (const char *source, int length)
} }
/* write_integer()-- Write a list-directed integer value. */ /* Write a list-directed integer value. */
static void static void
write_integer (const char *source, int length) write_integer (const char *source, int length)
...@@ -939,9 +940,8 @@ write_integer (const char *source, int length) ...@@ -939,9 +940,8 @@ write_integer (const char *source, int length)
} }
/* write_character()-- Write a list-directed string. We have to worry /* Write a list-directed string. We have to worry about delimiting
* about delimiting the strings if the file has been opened in that the strings if the file has been opened in that mode. */
* mode. */
static void static void
write_character (const char *source, int length) write_character (const char *source, int length)
...@@ -995,8 +995,8 @@ write_character (const char *source, int length) ...@@ -995,8 +995,8 @@ write_character (const char *source, int length)
} }
/* Output the Real number with default format. /* Output a real number with default format.
REAL(4) is 1PG14.7E2, and REAL(8) is 1PG23.15E3 */ This is 1PG14.7E2 for REAL(4) and 1PG23.15E3 for REAL(8). */
static void static void
write_real (const char *source, int length) write_real (const char *source, int length)
...@@ -1038,7 +1038,7 @@ write_complex (const char *source, int len) ...@@ -1038,7 +1038,7 @@ write_complex (const char *source, int len)
} }
/* write_separator()-- Write the separator between items. */ /* Write the separator between items. */
static void static void
write_separator (void) write_separator (void)
...@@ -1053,9 +1053,9 @@ write_separator (void) ...@@ -1053,9 +1053,9 @@ write_separator (void)
} }
/* list_formatted_write()-- Write an item with list formatting. /* Write an item with list formatting.
* TODO: handle skipping to the next record correctly, particularly TODO: handle skipping to the next record correctly, particularly
* with strings. */ with strings. */
void void
list_formatted_write (bt type, void *p, int len) list_formatted_write (bt type, void *p, int len)
...@@ -1160,4 +1160,3 @@ namelist_write (void) ...@@ -1160,4 +1160,3 @@ namelist_write (void)
write_character("/",1); write_character("/",1);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment