Fortran: simplify library code for integer-to-decimal conversion
libgfortran/ChangeLog: PR libfortran/81986 PR libfortran/99191 * libgfortran.h: Remove gfc_xtoa(), adjust gfc_itoa() and GFC_ITOA_BUF_SIZE. * io/write.c (write_decimal): conversion parameter is always gfc_itoa(), so remove it. Protect from overflow. (xtoa): Move gfc_xtoa and update its name. (xtoa_big): Renamed from ztoa_big for consistency. (write_z): Adjust to new function names. (write_i, write_integer): Remove last arg of write_decimal. * runtime/backtrace.c (error_callback): Comment on the use of gfc_itoa(). * runtime/error.c (gfc_xtoa): Move to io/write.c. * runtime/string.c (gfc_itoa): Take an unsigned argument, remove the handling of negative values.
Showing
- libgfortran/io/write.c 48 additions, 22 deletionslibgfortran/io/write.c
- libgfortran/libgfortran.h 2 additions, 5 deletionslibgfortran/libgfortran.h
- libgfortran/runtime/backtrace.c 1 addition, 0 deletionslibgfortran/runtime/backtrace.c
- libgfortran/runtime/error.c 0 additions, 31 deletionslibgfortran/runtime/error.c
- libgfortran/runtime/string.c 15 additions, 24 deletionslibgfortran/runtime/string.c
Loading
Please register or sign in to comment