summaryrefslogtreecommitdiff
path: root/libgfortran/io/write_float.def
AgeCommit message (Collapse)Author
2009-03-092009-03-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR libfortran/39409 * io/write_float.def (output_float): Handle F0.d formatting correctly for any d when value is 0.0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144718 138bc75d-0d04-0410-961f-82ee72b054a4
2008-12-222008-12-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR libfortran/37472 * io/write_float.def (output_float_FMT_G_): Modify calculation of temp to avoid sensitivity to round-off. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142884 138bc75d-0d04-0410-961f-82ee72b054a4
2008-12-212008-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR libfortran/38398 * io/io.h (st_parameter_dt): Add new bit to keep track of when to suppress blanks for g0 formatting. * io/transfer.c (formatted_transfer_scalar): Always call write_real_g0 for g0 formatting. * io.c (write.c): Do not use ES formatting and use new bit to suppress blanks. * io/write_float.def (output_float): Adjust the location of setting the width so that it can be adjusted when suppressing blanks. Set number of blanks to zero when dtp->u.p.g0_no_blanks is set. Do some minor code clean-up and add some white space for readability. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142871 138bc75d-0d04-0410-961f-82ee72b054a4
2008-12-052008-12-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR fortran/38285 * write_float.def (WRITE_FLOAT): Zero the float value for special case only if scale_factor = 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142455 138bc75d-0d04-0410-961f-82ee72b054a4
2008-11-212008-11-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR libfortran/37472 * io/write_float.def (output_float_FMT_G_): Adjust conversion of G format specification to F format. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142079 138bc75d-0d04-0410-961f-82ee72b054a4
2008-10-192008-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.orgjvdelisle
PR libfortran/37834 * io/write_float.def (output_float): Emit '0.' for special case of format specifier 'f0.0' and value of zero. Likewise emit '0' for 'f1.0'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141231 138bc75d-0d04-0410-961f-82ee72b054a4
2008-10-182008-10-17 Jerry DeLisle <jvdelisle@gcc.gnu.orgjvdelisle
PR libfortran/37707 * io/write_float.def (WRITE_FLOAT): Round to 1.0 correctly. * io/io.h (st_parameter_44): Fix id type declaration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141207 138bc75d-0d04-0410-961f-82ee72b054a4
2008-09-262008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.orgjvdelisle
PR libfortran/37498 * list_read.c (eat_separator): Revert previous patch and move delim_status, decimal_status, and pad_status to gfc_unit. (parse_real): Ditto. (read_real): Ditto. * read.c (read_a): Likewise. (read_a_char4): Likewise. (read_f): Likewise. * inquire.c (inquire_via_unit): Add missing check for IOPARM_INQUIRE_HAS_FLAGS2. (inquire_via_filename): Likewise. * io.h (unit_sign_s): Move delim_status, decimal_status, and pad_status to gfc_unit. * transfer.c (read_sf): Ditto. (read_block_form): Ditto. (formatted_transfer_scalar): Ditto. (data_transfer_init): Ditto. * write.c (write_default_char4): Ditto. (write_utf8_char4): Ditto. (write_character): Ditto. (write_real_g0): Ditto. (list_formatted_write_scalar): Ditto. (nml_write_obj): Ditto. (namelist_write): Ditto. * write_float.def (calculate_sign): Ditto. (output_float): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140684 138bc75d-0d04-0410-961f-82ee72b054a4
2008-09-232008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.orgjvdelisle
PR fortran/37498 * trans-io.c (gfc_build_io_library_fndecls): Bump pad size. (build_dt): Set mask bit for IOPARM_dt_f2003. * ioparm.def: Add IOPARM_dt_f2003. 2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org PR libfortran/37498 * file_pos (st_endfile): Clear memory only for libfortran 4.3 private area. * list_read.c (eat_separator): Only access F2003 I/O parameters if IOPARM_DT_HAS_F2003 bit is set. (parse_real): Ditto. (read_real): Ditto. * read.c (read_a): Likewise. (read_a_char4): Likewise though not strictly necessary. (read_f): Likewise. * io.h (unit_sign_s): New enumerator to allow duplication of st_parameter structures. (IOPARM_DT_HAS_F2003): New mask bit. (st_parameter_43): New structure copied from 4.3 version of st_paramater_dt private section. (st_parameter_44): New structure with F2003 items added. (st_parameter_dt): Modified to create union of new and old structures to allow correct memory setting for 4.3 ABI compatibility. Bumped the pad size. * transfer.c (read_sf): Do not use F2003 I/O memory areas unless IOPARM_DT_HAS_F2003 bit has been set. (read_block_form): Ditto. (formatted_transfer_scalar): Ditto. (data_transfer_init): Ditto and add comment, fix formatting. * write.c (write_default_char4): Likewise though not strictly necessary. (write_utf8_char4): Ditto. (write_character): Ditto. (write_real_g0): Ditto. (list_formatted_write_scalar): Ditto. (nml_write_obj): Ditto. (namelist_write): Ditto. * write_float.def (calculate_sign): Eliminate warning by including all cases in switch. (output_float): Output only decimal point of F2003 flag is not set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140576 138bc75d-0d04-0410-961f-82ee72b054a4
2008-07-212008-07-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR fortran/36857 * io/write_float.def: Comment out locale dependent code and fix general comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138021 138bc75d-0d04-0410-961f-82ee72b054a4
2008-04-052008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR fortran/25829 28655 * gfortran.map: Add new symbol, _gfortran_st_wait. * libgfortran.h (st_paramter_common): Add new I/O parameters. * open.c (st_option decimal_opt[], st_option encoding_opt[], st_option round_opt[], st_option sign_opt[], st_option async_opt[]): New parameter option arrays. (edit_modes): Add checks for new parameters. (new_unit): Likewise. (st_open): Likewise. * list_read.c (CASE_SEPERATORS): Add ';' as a valid separator. (eat_separator): Handle deimal comma. (read_logical): Fix whitespace. (parse_real): Handle decimal comma. (read_real): Handle decimal comma. * read.c (read_a): Use decimal status flag to allow comma in place of a decimal point. (read_f): Allow comma as acceptable character in float. According to decimal flag, substitute a period for a comma. (read_x): If decimal status flag is comma, disable the read_comma flag, not allowing comma as a delimiter, an extension otherwise. * io.h: (unit_decimal, unit_encoding, unit_round, unit_sign, unit_async): New enumerators. Add all new I/O parameters. * unix.c (unix_stream, int_stream): Add io_mode asychronous I/O control. (move_pos_offset, fd_alloc_w_at): Fix some whitespace. (fd_sfree): Use new enumerator. (fd_read): Likewise. (fd_write): Likewise. (fd_close): Fix whitespace. (fd_open): Use new enumertors. (tempfile, regular_file, open_external): Fix whitespace. (output_stream, error_stream): Set method. (stream_offset): Fix whitespace. * transfer.c: (st_option decimal_opt[], sign_opt[], blank_opt[]): New option arrays. (formatted_transfer_scalar): Set sf_read_comma flag based on new decimal_status flag. (data_transfer_init): Initialize new parameters. Add checks for decimal, sign, and blank. (st_wait): New stub. * format.c: (format_lex): Add format specifiers DP, DC, and D. (parse_format_list): Parse the new specifiers. * write.c (write_decimal): Use new sign enumerators to set the sign. (write_complex): Handle decimal comma and semi-colon separator. (nml_write_obj): Likewise. * write_float.def: Revise sign enumerators. (calculate_sign): Use new sign enumerators. (output_float): Likewise. Use new decimal_status flag to set the decimal character to a point or a comma. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133943 138bc75d-0d04-0410-961f-82ee72b054a4
2008-02-212008-02-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR libfortran/35036 * write_float.def (output_float): Add error checks for zero digits after decimal point in E and D format specifiers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132510 138bc75d-0d04-0410-961f-82ee72b054a4
2007-09-052007-03-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR libfortran/33225 * io/write.c (stdbool.h): Add include. (sign_t): Move typedef to new file write_float.def. Include write_float.def. (extract_real): Delete. (calculate_sign): Delete. (calculate_exp): Delete. (calculate_G_format): Delete. (output_float): Delete. (write_float): Delete. * io/write_float.def (calculate_sign): Added. (output_float): Refactored to be independent of kind and added to this file for inclusion. (write_infnan): New function to write "Infinite" or "NaN" depending on flags passed, independent of kind. (CALCULATE_EXP): New macro to build kind specific functions. Use it. (OUTPUT_FLOAT_FMT_G): New macro, likewise. Use it. (DTOA, DTOAL): Macros to implement "decimal to ascii". (WRITE_FLOAT): New macro for kind specific write_float functions. (write_float): Revised function to determine kind and use WRITE_FLOAT to implement kind specific output. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128114 138bc75d-0d04-0410-961f-82ee72b054a4
2007-08-312007-08-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
PR libfortran/33225 * io/write.c: Revert changes from patch of 2007-08-27. * io/write_float.def: Remove file, reverting addition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127950 138bc75d-0d04-0410-961f-82ee72b054a4
2007-08-282007-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle
* io/write.c (stdbool.h): Add include. (sign_t): Move typedef to new file write_float.def. Include write_float.def. (extract_real): Delete. (calculate_sign): Delete. (calculate_exp): Delete. (calculate_G_format): Delete. (output_float): Delete. (write_float): Delete. * io/write_float.def (calculate_sign): Added. (output_float): Refactored to be independent of kind and added to this file for inclusion. (write_infnan): New function to write "Infinite" or "NaN" depending on flags passed, independent of kind. (CALCULATE_EXP): New macro to build kind specific functions. Use it. (OUTPUT_FLOAT_FMT_G): New macro, likewise. Use it. (DTOA, DTOAL): Macros to implement "decimal to ascii". (WRITE_FLOAT): New macro for kind specific write_float functions. (write_float): Revised function to determine kind and use WRITE_FLOAT to implement kind specific output. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127846 138bc75d-0d04-0410-961f-82ee72b054a4