diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-29 13:53:59 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-29 13:53:59 +0000 |
commit | fb35179aa55fc69f7e58d3364684246fd3b584ce (patch) | |
tree | 6e3201f8c8d3d502dd57d16041c0f18d17a276f9 /libgfortran/io | |
parent | 908cb59d263cca413d6a47836cee043d3b3b9ece (diff) | |
download | gcc-fb35179aa55fc69f7e58d3364684246fd3b584ce.tar.gz |
* runtime/string.c (find_option): Change 3rd argument to
const st_option *.
* libgfortran.h (find_option): Likewise.
* runtime/environ.c (rounding, precision, signal_choices): Constify.
(init_choice, show_choice): Change 2nd argument to const choice *.
* io/open.c (access_opt, action_opt, blank_opt, delim_opt, form_opt,
position_opt, status_opt, pad_opt): Constify.
* io/transfer.c (advance_opt): Likewise.
* io/inquire.c (undefined): Likewise.
* io/close.c (status_opt): Likewise.
* io/format.c (posint_required, period_required, nonneg_required,
unexpected_element, unexpected_end, bad_string, bad_hollerith,
reversion_error): Likewise.
* io/unix.c (yes, no, unknown): Change from const char *
into const char [].
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104773 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/close.c | 2 | ||||
-rw-r--r-- | libgfortran/io/format.c | 2 | ||||
-rw-r--r-- | libgfortran/io/inquire.c | 2 | ||||
-rw-r--r-- | libgfortran/io/open.c | 16 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 2 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/libgfortran/io/close.c b/libgfortran/io/close.c index 3abacebbc39..dcb18095004 100644 --- a/libgfortran/io/close.c +++ b/libgfortran/io/close.c @@ -36,7 +36,7 @@ typedef enum { CLOSE_DELETE, CLOSE_KEEP, CLOSE_UNSPECIFIED } close_status; -static st_option status_opt[] = { +static const st_option status_opt[] = { {"keep", CLOSE_KEEP}, {"delete", CLOSE_DELETE}, {NULL, 0} diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 3f7091e66d0..e714e3bc2ad 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -61,7 +61,7 @@ static fnode colon_node = { FMT_COLON, 0, NULL, NULL, {{ 0, 0, 0 }}, 0, /* Error messages */ -static char posint_required[] = "Positive width required in format", +static const char posint_required[] = "Positive width required in format", period_required[] = "Period required in format", nonneg_required[] = "Nonnegative width required in format", unexpected_element[] = "Unexpected element in format", diff --git a/libgfortran/io/inquire.c b/libgfortran/io/inquire.c index 31f1ad18b02..56f466e3d0a 100644 --- a/libgfortran/io/inquire.c +++ b/libgfortran/io/inquire.c @@ -35,7 +35,7 @@ Boston, MA 02110-1301, USA. */ #include "io.h" -static char undefined[] = "UNDEFINED"; +static const char undefined[] = "UNDEFINED"; /* inquire_via_unit()-- Inquiry via unit number. The unit might not exist. */ diff --git a/libgfortran/io/open.c b/libgfortran/io/open.c index 333ac6f8436..82d5a355e0d 100644 --- a/libgfortran/io/open.c +++ b/libgfortran/io/open.c @@ -36,13 +36,13 @@ Boston, MA 02110-1301, USA. */ #include "io.h" -static st_option access_opt[] = { +static const st_option access_opt[] = { {"sequential", ACCESS_SEQUENTIAL}, {"direct", ACCESS_DIRECT}, {NULL, 0} }; -static st_option action_opt[] = +static const st_option action_opt[] = { { "read", ACTION_READ}, { "write", ACTION_WRITE}, @@ -50,14 +50,14 @@ static st_option action_opt[] = { NULL, 0} }; -static st_option blank_opt[] = +static const st_option blank_opt[] = { { "null", BLANK_NULL}, { "zero", BLANK_ZERO}, { NULL, 0} }; -static st_option delim_opt[] = +static const st_option delim_opt[] = { { "none", DELIM_NONE}, { "apostrophe", DELIM_APOSTROPHE}, @@ -65,14 +65,14 @@ static st_option delim_opt[] = { NULL, 0} }; -static st_option form_opt[] = +static const st_option form_opt[] = { { "formatted", FORM_FORMATTED}, { "unformatted", FORM_UNFORMATTED}, { NULL, 0} }; -static st_option position_opt[] = +static const st_option position_opt[] = { { "asis", POSITION_ASIS}, { "rewind", POSITION_REWIND}, @@ -80,7 +80,7 @@ static st_option position_opt[] = { NULL, 0} }; -static st_option status_opt[] = +static const st_option status_opt[] = { { "unknown", STATUS_UNKNOWN}, { "old", STATUS_OLD}, @@ -90,7 +90,7 @@ static st_option status_opt[] = { NULL, 0} }; -static st_option pad_opt[] = +static const st_option pad_opt[] = { { "yes", PAD_YES}, { "no", PAD_NO}, diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index ca9246b89f7..06c5a98106e 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -97,7 +97,7 @@ static char *line_buffer = NULL; static unit_advance advance_status; -static st_option advance_opt[] = { +static const st_option advance_opt[] = { {"yes", ADVANCE_YES}, {"no", ADVANCE_NO}, {NULL, 0} diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index e402f4432c9..4966726f830 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1197,7 +1197,7 @@ file_exists (void) -static const char *yes = "YES", *no = "NO", *unknown = "UNKNOWN"; +static const char yes[] = "YES", no[] = "NO", unknown[] = "UNKNOWN"; /* inquire_sequential()-- Given a fortran string, determine if the * file is suitable for sequential access. Returns a C-style |