From aad89ecff0130860eaba36a041dad8f60601c479 Mon Sep 17 00:00:00 2001 From: jb Date: Tue, 19 Mar 2013 11:13:32 +0000 Subject: Use C99 bool instead of enum try. 2013-03-19 Janne Blomqvist * libgfortran.h: Include stdbool.h. (enum try): Remove. (notify_std): Change return type to bool. * intrinsics/chmod.c: Don't include stdbool.h. * intrinsics/execute_command_line.c: Likewise. * io/format.c: Likewise. * io/list_read.c (nml_parse_qualifier): Change return type to bool. (nml_read_obj): Likewise. (nml_get_obj_data): Likewise. * io/transfer.c (read_block_form): Fix comment. (write_buf): Change return type to bool. * io/write.c: Don't include stdbool.h. * io/write_float.def (output_float): Change return type to bool. (output_float_FMT_G_ ## x): Change type of result variable. * runtime/error.c (notify_std): Change return type to bool. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196791 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/libgfortran.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libgfortran/libgfortran.h') diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index f54edc09634..56c98715feb 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -43,6 +43,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include #include #include +#include #if HAVE_COMPLEX_H /* Must appear before math.h on VMS systems. */ @@ -561,10 +562,6 @@ typedef enum { NOTIFICATION_SILENT, NOTIFICATION_WARNING, NOTIFICATION_ERROR } notification; -/* This is returned by notify_std and several io functions. */ -typedef enum -{ SUCCESS = 1, FAILURE } -try; /* The filename and line number don't go inside the globals structure. They are set by the rest of the program and must be linked to. */ @@ -732,7 +729,7 @@ iexport_proto(generate_error); extern void generate_warning (st_parameter_common *, const char *); internal_proto(generate_warning); -extern try notify_std (st_parameter_common *, int, const char *); +extern bool notify_std (st_parameter_common *, int, const char *); internal_proto(notify_std); extern notification notification_std(int); -- cgit v1.2.1