aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/write.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2007-07-29 20:01:45 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2007-07-29 20:01:45 +0000
commitd8163f5cc068347dfd74cb03c9e7b6cfcd3a8460 (patch)
tree05a77906359d7bd336aba3bd8c097b7414e1f63a /libgfortran/io/write.c
parent6a56381bf7e8825e08ec3a47bc14230528c82462 (diff)
downloadgcc-d8163f5cc068347dfd74cb03c9e7b6cfcd3a8460.zip
gcc-d8163f5cc068347dfd74cb03c9e7b6cfcd3a8460.tar.gz
gcc-d8163f5cc068347dfd74cb03c9e7b6cfcd3a8460.tar.bz2
re PR libfortran/32858 (printf-capabilities for runtime_error())
2007-07-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/32858 PR libfortran/30814 * configure.ac: Added checks for presence of stdio.h and stdarg.h. Test presence of vsnprintf(). * configure: Regenerated. * config.h.in: Regenerated. * libgfortran.h: Include <stdio.h>. Add printf attribute to prototype of runtime_error. Remove prototype for st_sprintf. Add prototype for st_vprintf. * runtime/main.c (store_exec_path): Replace st_sprintf by sprintf. * runtime/error.c (st_sprintf): Remove. (runtime_error): Rewrite as a variadic function. Call st_vprintf(). * intrinsics/pack_generic.c: Output extents of LHS and RHS for bounds error. * io/open.c (new_unit): Replace st_sprintf by sprintf. * io/list_read.c (convert_integer): Likewise. (parse_repeat): Likewise. (read_logical): Likewise. (read_character): Likewise. (parse_real): Likewise. (read_real): Likewise. (check_type): Likewise. (nml_parse_qualifyer): Likewise. (nml_read_obj): Likewise. (nml_get_ojb_data): Likewise. * io/unix.c (init_error_stream): Remove. (tempfile): Replace st_sprintf by sprintf. (st_vprintf): New function. (st_printf): Rewrite to call st_vprintf. * io/transfer.c (require_type): Replace st_sprintf by sprintf. * io/format.c (format_error): Likewise. * io/write.c (nml_write_obj): Likewise. 2007-07-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/32858 PR libfortran/30814 * gfortran.dg/pack_bounds_1.f90: Adjust to new error message. From-SVN: r127049
Diffstat (limited to 'libgfortran/io/write.c')
-rw-r--r--libgfortran/io/write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index b4e5d3e..9509711 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -1719,7 +1719,7 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info * obj, index_type offset,
{
if (rep_ctr > 1)
{
- st_sprintf(rep_buff, " %d*", rep_ctr);
+ sprintf(rep_buff, " %d*", rep_ctr);
write_character (dtp, rep_buff, strlen (rep_buff));
dtp->u.p.no_leading_blank = 1;
}
@@ -1792,7 +1792,7 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info * obj, index_type offset,
ext_name[tot_len] = '(';
tot_len++;
}
- st_sprintf (ext_name + tot_len, "%d", (int) obj->ls[dim_i].idx);
+ sprintf (ext_name + tot_len, "%d", (int) obj->ls[dim_i].idx);
tot_len += strlen (ext_name + tot_len);
ext_name[tot_len] = (dim_i == obj->var_rank - 1) ? ')' : ',';
tot_len++;