diff options
Diffstat (limited to 'libgfortran/io/write.c')
-rw-r--r-- | libgfortran/io/write.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 278cd47..b9e9284 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -30,7 +30,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "unix.h" #include <assert.h> #include <string.h> -#include <ctype.h> #define star_fill(p, n) memset(p, '*', n) @@ -2101,14 +2100,14 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info *obj, index_type offset, base_name_len = strlen (base_name); for (dim_i = 0; dim_i < base_name_len; dim_i++) { - cup = toupper ((int) base_name[dim_i]); + cup = safe_toupper (base_name[dim_i]); write_character (dtp, &cup, 1, 1, NODELIM); } } clen = strlen (obj->var_name); for (dim_i = len; dim_i < clen; dim_i++) { - cup = toupper ((int) obj->var_name[dim_i]); + cup = safe_toupper (obj->var_name[dim_i]); if (cup == '+') cup = '%'; write_character (dtp, &cup, 1, 1, NODELIM); @@ -2426,7 +2425,7 @@ namelist_write (st_parameter_dt *dtp) /* Write namelist name in upper case - f95 std. */ for (gfc_charlen_type i = 0; i < dtp->namelist_name_len; i++ ) { - c = toupper ((int) dtp->namelist_name[i]); + c = safe_toupper (dtp->namelist_name[i]); write_character (dtp, &c, 1 ,1, NODELIM); } |