Commit 26f096f9 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * bad.c (_ffebad_message_, ffebad_string_, ffebad_message_,
        ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string,
        ffebad_finish): Const-ify a char*.
        * bld.c (ffebld_op_string_, ffebld_op_string): Likewise.
        * bld.h (ffebld_op_string): Likewise.
        * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_,
        ffecom_debug_kludge_, ffecom_f2c_make_type_,
        ffecom_get_appended_identifier_, ffecom_get_identifier_,
        ffecom_gfrt_args_): Likewise.
        (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype.
        (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_,
        ffecom_arglist_expr_, ffecom_build_f2c_string_,
        ffecom_debug_kludge_, ffecom_f2c_make_type_,
        ffecom_get_appended_identifier_, ffecom_get_external_identifier_,
        ffecom_get_identifier_, ffecom_decl_field,
        ffecom_get_invented_identifier, lang_print_error_function,
        skip_redundant_dir_prefix, read_name_map, print_containing_files):
        Const-ify a char*.
        (savestring): Remove, use `xstrdup' instead.
        * com.h (ffecom_decl_field, ffecom_get_invented_identifier):
        Const-ify a char*.
        * data.c (ffebld, ffedata_gather_): Make explicitly static.
        * expr.c (ffeexpr_isdigits_, ffeexpr_percent_,
        ffeexpr_reduced_concatenate_, ffeexpr_nil_real_,
        ffeexpr_nil_number_, ffeexpr_nil_number_period_,
        ffeexpr_nil_number_real_, ffeexpr_token_real_,
        ffeexpr_token_number_, ffeexpr_token_number_period_,
        ffeexpr_token_number_real_): Const-ify a char*.
        * fini.c (xspaces): Likewise.
        * global.c (ffeglobal_type_string_): Likewise.
        (ffeglobal_drive): Protoize.
        (ffeglobal_proc_def_arg): Const-ify a char*.
        * global.h (ffeglobal_drive): Protoize.
        (ffeglobal_proc_def_arg): Const-ify a char*.
        * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type):
        Likewise.
        * implic.h (ffeimplic_peek_symbol_type): Likewise.
        * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_,
        ffeinfo_kind_string_, ffeinfo_kindtype_string_,
        ffeinfo_where_string_, ffeinfo_basictype_string,
        ffeinfo_kind_message, ffeinfo_kind_string,
        ffeinfo_kindtype_string, ffeinfo_where_string): Likewise.
        * info.h (ffeinfo_basictype_string, ffeinfo_kind_message,
        ffeinfo_kind_string, ffeinfo_kindtype_string,
        ffeinfo_where_string): Likewise.
        * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
        _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_,
        ffeintrin_fulfill_specific, ffeintrin_init_0,
        ffeintrin_is_actualarg, ffeintrin_is_intrinsic,
        ffeintrin_name_generic, ffeintrin_name_implementation,
        ffeintrin_name_specific): Likewise.
        * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic,
        ffeintrin_name_implementation, ffeintrin_name_specific): Likewise.
        * lex.c (ffelex_type_string_, ffelex_token_new_character,
        ffelex_token_new_name, ffelex_token_new_names,
        ffelex_token_new_number): Likewise.
        * lex.h (ffelex_token_new_character, ffelex_token_new_name,
        ffelex_token_new_names, ffelex_token_new_number): Likewise.
        * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_,
        malloc_new_zinpool_): Likewise.
        * malloc.h (malloc_new_inpool_, malloc_new_zinpool_,
        malloc_pool_new): Likewise.
        * name.c (ffename_space_drive_global, ffename_space_drive_symbol):
        Protoize.
        * name.h (ffename_space_drive_global, ffename_space_drive_symbol):
        Likewise.
        * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_,
        ffesymbol_attrs_string): Const-ify a char*.
        (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
        (ffesymbol_state_string): Const-ify a char*.
        * symbol.h (ffesymbol_attrs_string): Likewise.
        (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
        (ffesymbol_state_string): Const-ify a char*.
        * target.c (ffetarget_layout): Likewise.
        * target.h (ffetarget_layout): Likewise.

From-SVN: r26013
parent 90e734a8
Sat Mar 27 13:00:43 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* bad.c (_ffebad_message_, ffebad_string_, ffebad_message_,
ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string,
ffebad_finish): Const-ify a char*.
* bld.c (ffebld_op_string_, ffebld_op_string): Likewise.
* bld.h (ffebld_op_string): Likewise.
* com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_,
ffecom_debug_kludge_, ffecom_f2c_make_type_,
ffecom_get_appended_identifier_, ffecom_get_identifier_,
ffecom_gfrt_args_): Likewise.
(ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype.
(builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_,
ffecom_arglist_expr_, ffecom_build_f2c_string_,
ffecom_debug_kludge_, ffecom_f2c_make_type_,
ffecom_get_appended_identifier_, ffecom_get_external_identifier_,
ffecom_get_identifier_, ffecom_decl_field,
ffecom_get_invented_identifier, lang_print_error_function,
skip_redundant_dir_prefix, read_name_map, print_containing_files):
Const-ify a char*.
(savestring): Remove, use `xstrdup' instead.
* com.h (ffecom_decl_field, ffecom_get_invented_identifier):
Const-ify a char*.
* data.c (ffebld, ffedata_gather_): Make explicitly static.
* expr.c (ffeexpr_isdigits_, ffeexpr_percent_,
ffeexpr_reduced_concatenate_, ffeexpr_nil_real_,
ffeexpr_nil_number_, ffeexpr_nil_number_period_,
ffeexpr_nil_number_real_, ffeexpr_token_real_,
ffeexpr_token_number_, ffeexpr_token_number_period_,
ffeexpr_token_number_real_): Const-ify a char*.
* fini.c (xspaces): Likewise.
* global.c (ffeglobal_type_string_): Likewise.
(ffeglobal_drive): Protoize.
(ffeglobal_proc_def_arg): Const-ify a char*.
* global.h (ffeglobal_drive): Protoize.
(ffeglobal_proc_def_arg): Const-ify a char*.
* implic.c (ffeimplic_none, ffeimplic_peek_symbol_type):
Likewise.
* implic.h (ffeimplic_peek_symbol_type): Likewise.
* info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_,
ffeinfo_kind_string_, ffeinfo_kindtype_string_,
ffeinfo_where_string_, ffeinfo_basictype_string,
ffeinfo_kind_message, ffeinfo_kind_string,
ffeinfo_kindtype_string, ffeinfo_where_string): Likewise.
* info.h (ffeinfo_basictype_string, ffeinfo_kind_message,
ffeinfo_kind_string, ffeinfo_kindtype_string,
ffeinfo_where_string): Likewise.
* intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_,
_ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_,
ffeintrin_fulfill_specific, ffeintrin_init_0,
ffeintrin_is_actualarg, ffeintrin_is_intrinsic,
ffeintrin_name_generic, ffeintrin_name_implementation,
ffeintrin_name_specific): Likewise.
* intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic,
ffeintrin_name_implementation, ffeintrin_name_specific): Likewise.
* lex.c (ffelex_type_string_, ffelex_token_new_character,
ffelex_token_new_name, ffelex_token_new_names,
ffelex_token_new_number): Likewise.
* lex.h (ffelex_token_new_character, ffelex_token_new_name,
ffelex_token_new_names, ffelex_token_new_number): Likewise.
* malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_,
malloc_new_zinpool_): Likewise.
* malloc.h (malloc_new_inpool_, malloc_new_zinpool_,
malloc_pool_new): Likewise.
* name.c (ffename_space_drive_global, ffename_space_drive_symbol):
Protoize.
* name.h (ffename_space_drive_global, ffename_space_drive_symbol):
Likewise.
* symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_,
ffesymbol_attrs_string): Const-ify a char*.
(ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
(ffesymbol_state_string): Const-ify a char*.
* symbol.h (ffesymbol_attrs_string): Likewise.
(ffesymbol_drive, ffesymbol_drive_sfnames): Protoize.
(ffesymbol_state_string): Const-ify a char*.
* target.c (ffetarget_layout): Likewise.
* target.h (ffetarget_layout): Likewise.
1999-03-25 Zack Weinberg <zack@rabi.columbia.edu> 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
* Make-lang.in: Remove all references to g77.o/g77.c. * Make-lang.in: Remove all references to g77.o/g77.c.
......
...@@ -62,7 +62,7 @@ bool ffebad_is_inhibited_ = FALSE; ...@@ -62,7 +62,7 @@ bool ffebad_is_inhibited_ = FALSE;
struct _ffebad_message_ struct _ffebad_message_
{ {
ffebadSeverity severity; ffebadSeverity severity;
char *message; const char *message;
}; };
/* Static objects accessed by functions in this module. */ /* Static objects accessed by functions in this module. */
...@@ -89,11 +89,11 @@ static struct ...@@ -89,11 +89,11 @@ static struct
} }
ffebad_here_[FFEBAD_MAX_]; ffebad_here_[FFEBAD_MAX_];
static char *ffebad_string_[FFEBAD_MAX_]; static const char *ffebad_string_[FFEBAD_MAX_];
static ffebadIndex ffebad_order_[FFEBAD_MAX_]; static ffebadIndex ffebad_order_[FFEBAD_MAX_];
static ffebad ffebad_errnum_; static ffebad ffebad_errnum_;
static ffebadSeverity ffebad_severity_; static ffebadSeverity ffebad_severity_;
static char *ffebad_message_; static const char *ffebad_message_;
static unsigned char ffebad_index_; static unsigned char ffebad_index_;
static ffebadIndex ffebad_places_; static ffebadIndex ffebad_places_;
static bool ffebad_is_temp_inhibited_; /* Effective setting of static bool ffebad_is_temp_inhibited_; /* Effective setting of
...@@ -102,7 +102,7 @@ static bool ffebad_is_temp_inhibited_; /* Effective setting of ...@@ -102,7 +102,7 @@ static bool ffebad_is_temp_inhibited_; /* Effective setting of
/* Static functions (internal). */ /* Static functions (internal). */
static int ffebad_bufputs_ (char buf[], int bufi, char *s); static int ffebad_bufputs_ (char buf[], int bufi, const char *s);
/* Internal macros. */ /* Internal macros. */
...@@ -115,7 +115,7 @@ static int ffebad_bufputs_ (char buf[], int bufi, char *s); ...@@ -115,7 +115,7 @@ static int ffebad_bufputs_ (char buf[], int bufi, char *s);
static int static int
ffebad_bufputs_ (char buf[], int bufi, char *s) ffebad_bufputs_ (char buf[], int bufi, const char *s)
{ {
for (; *s != '\0'; ++s) for (; *s != '\0'; ++s)
bufi = ffebad_bufputc_ (buf, bufi, *s); bufi = ffebad_bufputc_ (buf, bufi, *s);
...@@ -161,7 +161,7 @@ ffebad_severity (ffebad errnum) ...@@ -161,7 +161,7 @@ ffebad_severity (ffebad errnum)
bool bool
ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev, ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
char *message) const char *message)
{ {
unsigned char i; unsigned char i;
...@@ -321,7 +321,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col) ...@@ -321,7 +321,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
/* Establish string for next index (always in order) of message /* Establish string for next index (always in order) of message
ffebad_string(char *string); ffebad_string(const char *string);
Call ffebad_start to establish the message, ffebad_here and ffebad_string Call ffebad_start to establish the message, ffebad_here and ffebad_string
to send run-time data to it as necessary, then ffebad_finish when through to send run-time data to it as necessary, then ffebad_finish when through
...@@ -330,7 +330,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col) ...@@ -330,7 +330,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
the argument passed in until then. */ the argument passed in until then. */
void void
ffebad_string (char *string) ffebad_string (const char *string)
{ {
if (ffebad_is_temp_inhibited_) if (ffebad_is_temp_inhibited_)
return; return;
...@@ -351,7 +351,7 @@ void ...@@ -351,7 +351,7 @@ void
ffebad_finish () ffebad_finish ()
{ {
#define MAX_SPACES 132 #define MAX_SPACES 132
static char *spaces static const char *spaces
= "...>\ = "...>\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ \040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\ \040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
...@@ -373,8 +373,8 @@ ffebad_finish () ...@@ -373,8 +373,8 @@ ffebad_finish ()
unsigned short i; unsigned short i;
char pointer; char pointer;
unsigned char c; unsigned char c;
unsigned char *s; unsigned const char *s;
char *fn; const char *fn;
static char buf[1024]; static char buf[1024];
int bufi; int bufi;
int index; int index;
......
...@@ -82,8 +82,8 @@ void ffebad_init_0 (void); ...@@ -82,8 +82,8 @@ void ffebad_init_0 (void);
bool ffebad_is_fatal (ffebad errnum); bool ffebad_is_fatal (ffebad errnum);
ffebadSeverity ffebad_severity (ffebad errnum); ffebadSeverity ffebad_severity (ffebad errnum);
bool ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev, bool ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
char *message); const char *message);
void ffebad_string (char *string); void ffebad_string (const char *string);
/* Define macros. */ /* Define macros. */
......
...@@ -203,7 +203,7 @@ static ffebldConstant ffebld_constant_hollerith_; ...@@ -203,7 +203,7 @@ static ffebldConstant ffebld_constant_hollerith_;
static ffebldConstant ffebld_constant_typeless_[FFEBLD_constTYPELESS_LAST static ffebldConstant ffebld_constant_typeless_[FFEBLD_constTYPELESS_LAST
- FFEBLD_constTYPELESS_FIRST + 1]; - FFEBLD_constTYPELESS_FIRST + 1];
static char *ffebld_op_string_[] static const char *ffebld_op_string_[]
= =
{ {
#define FFEBLD_OP(KWD,NAME,ARITY) NAME, #define FFEBLD_OP(KWD,NAME,ARITY) NAME,
...@@ -5745,7 +5745,7 @@ ffebld_pool_push (mallocPool pool) ...@@ -5745,7 +5745,7 @@ ffebld_pool_push (mallocPool pool)
Returns a short string (uppercase) containing the name of the op. */ Returns a short string (uppercase) containing the name of the op. */
char * const char *
ffebld_op_string (ffebldOp o) ffebld_op_string (ffebldOp o)
{ {
if (o >= ARRAY_SIZE (ffebld_op_string_)) if (o >= ARRAY_SIZE (ffebld_op_string_))
......
...@@ -726,7 +726,7 @@ ffebld ffebld_new_symter (ffesymbol s, ffeintrinGen gen, ffeintrinSpec spec, ...@@ -726,7 +726,7 @@ ffebld ffebld_new_symter (ffesymbol s, ffeintrinGen gen, ffeintrinSpec spec,
ffeintrinImp imp); ffeintrinImp imp);
ffebld ffebld_new_one (ffebldOp o, ffebld left); ffebld ffebld_new_one (ffebldOp o, ffebld left);
ffebld ffebld_new_two (ffebldOp o, ffebld left, ffebld right); ffebld ffebld_new_two (ffebldOp o, ffebld left, ffebld right);
char *ffebld_op_string (ffebldOp o); const char *ffebld_op_string (ffebldOp o);
void ffebld_pool_pop (void); void ffebld_pool_pop (void);
void ffebld_pool_push (mallocPool pool); void ffebld_pool_push (mallocPool pool);
ffetargetCharacterSize ffebld_size_max (ffebld b); ffetargetCharacterSize ffebld_size_max (ffebld b);
......
...@@ -283,7 +283,7 @@ tree ffecom_arg_ptr_to_expr (ffebld expr, tree *length); ...@@ -283,7 +283,7 @@ tree ffecom_arg_ptr_to_expr (ffebld expr, tree *length);
tree ffecom_call_gfrt (ffecomGfrt ix, tree args); tree ffecom_call_gfrt (ffecomGfrt ix, tree args);
tree ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt, tree ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
ffeinfoKindtype kt, tree tree_type); ffeinfoKindtype kt, tree tree_type);
tree ffecom_decl_field (tree context, tree prevfield, char *name, tree ffecom_decl_field (tree context, tree prevfield, const char *name,
tree type); tree type);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
void ffecom_close_include (FILE *f); void ffecom_close_include (FILE *f);
...@@ -299,7 +299,7 @@ tree ffecom_expr_rw (ffebld expr); ...@@ -299,7 +299,7 @@ tree ffecom_expr_rw (ffebld expr);
void ffecom_finish_compile (void); void ffecom_finish_compile (void);
void ffecom_finish_decl (tree decl, tree init, bool is_top_level); void ffecom_finish_decl (tree decl, tree init, bool is_top_level);
void ffecom_finish_progunit (void); void ffecom_finish_progunit (void);
tree ffecom_get_invented_identifier (char *pattern, char *text, tree ffecom_get_invented_identifier (const char *pattern, const char *text,
int number); int number);
ffeinfoKindtype ffecom_gfrt_basictype (ffecomGfrt ix); ffeinfoKindtype ffecom_gfrt_basictype (ffecomGfrt ix);
ffeinfoKindtype ffecom_gfrt_kindtype (ffecomGfrt ix); ffeinfoKindtype ffecom_gfrt_kindtype (ffecomGfrt ix);
......
...@@ -668,7 +668,7 @@ tail_recurse: /* :::::::::::::::::::: */ ...@@ -668,7 +668,7 @@ tail_recurse: /* :::::::::::::::::::: */
expression doesn't already exist in the cache) and then puts the result expression doesn't already exist in the cache) and then puts the result
in the cache. */ in the cache. */
ffebld static ffebld
ffedata_convert_ (ffebld source, ffelexToken source_token, ffedata_convert_ (ffebld source, ffelexToken source_token,
ffelexToken dest_token, ffeinfoBasictype bt, ffelexToken dest_token, ffeinfoBasictype bt,
ffeinfoKindtype kt, ffeinfoRank rk, ffeinfoKindtype kt, ffeinfoRank rk,
...@@ -1119,7 +1119,7 @@ ffedata_eval_substr_end_ (ffebld expr, ffetargetCharacterSize min, ...@@ -1119,7 +1119,7 @@ ffedata_eval_substr_end_ (ffebld expr, ffetargetCharacterSize min,
If st has any initialization info, transfer that info into mst and If st has any initialization info, transfer that info into mst and
clear st's info. */ clear st's info. */
void static void
ffedata_gather_ (ffestorag mst, ffestorag st) ffedata_gather_ (ffestorag mst, ffestorag st)
{ {
ffesymbol s; ffesymbol s;
......
...@@ -268,7 +268,7 @@ static void ffeexpr_update_impdo_sym_ (ffebld expr, ffesymbol dovar); ...@@ -268,7 +268,7 @@ static void ffeexpr_update_impdo_sym_ (ffebld expr, ffesymbol dovar);
static ffeexprContext ffeexpr_context_outer_ (ffeexprStack_ s); static ffeexprContext ffeexpr_context_outer_ (ffeexprStack_ s);
static ffeexprExpr_ ffeexpr_expr_new_ (void); static ffeexprExpr_ ffeexpr_expr_new_ (void);
static void ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t); static void ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t);
static bool ffeexpr_isdigits_ (char *p); static bool ffeexpr_isdigits_ (const char *p);
static ffelexHandler ffeexpr_token_first_lhs_ (ffelexToken t); static ffelexHandler ffeexpr_token_first_lhs_ (ffelexToken t);
static ffelexHandler ffeexpr_token_first_lhs_1_ (ffelexToken t); static ffelexHandler ffeexpr_token_first_lhs_1_ (ffelexToken t);
static ffelexHandler ffeexpr_token_first_rhs_ (ffelexToken t); static ffelexHandler ffeexpr_token_first_rhs_ (ffelexToken t);
...@@ -8584,7 +8584,7 @@ ffeexpr_context_outer_ (ffeexprStack_ s) ...@@ -8584,7 +8584,7 @@ ffeexpr_context_outer_ (ffeexprStack_ s)
static ffeexprPercent_ static ffeexprPercent_
ffeexpr_percent_ (ffelexToken t) ffeexpr_percent_ (ffelexToken t)
{ {
char *p; const char *p;
switch (ffelex_token_length (t)) switch (ffelex_token_length (t))
{ {
...@@ -9537,7 +9537,7 @@ ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t) ...@@ -9537,7 +9537,7 @@ ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t)
/* Check whether rest of string is all decimal digits. */ /* Check whether rest of string is all decimal digits. */
static bool static bool
ffeexpr_isdigits_ (char *p) ffeexpr_isdigits_ (const char *p)
{ {
for (; *p != '\0'; ++p) for (; *p != '\0'; ++p)
if (! ISDIGIT (*p)) if (! ISDIGIT (*p))
...@@ -10378,7 +10378,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, ...@@ -10378,7 +10378,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op,
if ((lkd != FFEINFO_kindANY) if ((lkd != FFEINFO_kindANY)
&& ffebad_start (FFEBAD_CONCAT_ARG_KIND)) && ffebad_start (FFEBAD_CONCAT_ARG_KIND))
{ {
char *what; const char *what;
if (lrk != 0) if (lrk != 0)
what = "an array"; what = "an array";
...@@ -10394,7 +10394,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op, ...@@ -10394,7 +10394,7 @@ ffeexpr_reduced_concatenate_ (ffebld reduced, ffeexprExpr_ l, ffeexprExpr_ op,
{ {
if (ffebad_start (FFEBAD_CONCAT_ARG_KIND)) if (ffebad_start (FFEBAD_CONCAT_ARG_KIND))
{ {
char *what; const char *what;
if (rrk != 0) if (rrk != 0)
what = "an array"; what = "an array";
...@@ -11666,7 +11666,7 @@ static ffelexHandler ...@@ -11666,7 +11666,7 @@ static ffelexHandler
ffeexpr_nil_real_ (ffelexToken t) ffeexpr_nil_real_ (ffelexToken t)
{ {
char d; char d;
char *p; const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME) if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES)) && (ffelex_token_type (t) != FFELEX_typeNAMES))
...@@ -11704,7 +11704,7 @@ static ffelexHandler ...@@ -11704,7 +11704,7 @@ static ffelexHandler
ffeexpr_nil_number_ (ffelexToken t) ffeexpr_nil_number_ (ffelexToken t)
{ {
char d; char d;
char *p; const char *p;
if (ffeexpr_hollerith_count_ > 0) if (ffeexpr_hollerith_count_ > 0)
ffelex_set_expecting_hollerith (0, '\0', ffelex_set_expecting_hollerith (0, '\0',
...@@ -11779,7 +11779,7 @@ ffeexpr_nil_number_period_ (ffelexToken t) ...@@ -11779,7 +11779,7 @@ ffeexpr_nil_number_period_ (ffelexToken t)
{ {
ffelexHandler nexthandler; ffelexHandler nexthandler;
char d; char d;
char *p; const char *p;
switch (ffelex_token_type (t)) switch (ffelex_token_type (t))
{ {
...@@ -11836,7 +11836,7 @@ static ffelexHandler ...@@ -11836,7 +11836,7 @@ static ffelexHandler
ffeexpr_nil_number_real_ (ffelexToken t) ffeexpr_nil_number_real_ (ffelexToken t)
{ {
char d; char d;
char *p; const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME) if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES)) && (ffelex_token_type (t) != FFELEX_typeNAMES))
...@@ -13652,7 +13652,7 @@ static ffelexHandler ...@@ -13652,7 +13652,7 @@ static ffelexHandler
ffeexpr_token_real_ (ffelexToken t) ffeexpr_token_real_ (ffelexToken t)
{ {
char d; char d;
char *p; const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME) if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES)) && (ffelex_token_type (t) != FFELEX_typeNAMES))
...@@ -13809,7 +13809,7 @@ ffeexpr_token_number_ (ffelexToken t) ...@@ -13809,7 +13809,7 @@ ffeexpr_token_number_ (ffelexToken t)
ffeexprExpr_ e; ffeexprExpr_ e;
ffeinfo ni; ffeinfo ni;
char d; char d;
char *p; const char *p;
if (ffeexpr_hollerith_count_ > 0) if (ffeexpr_hollerith_count_ > 0)
ffelex_set_expecting_hollerith (0, '\0', ffelex_set_expecting_hollerith (0, '\0',
...@@ -13965,7 +13965,7 @@ ffeexpr_token_number_period_ (ffelexToken t) ...@@ -13965,7 +13965,7 @@ ffeexpr_token_number_period_ (ffelexToken t)
{ {
ffeexprExpr_ e; ffeexprExpr_ e;
ffelexHandler nexthandler; ffelexHandler nexthandler;
char *p; const char *p;
char d; char d;
switch (ffelex_token_type (t)) switch (ffelex_token_type (t))
...@@ -14083,7 +14083,7 @@ static ffelexHandler ...@@ -14083,7 +14083,7 @@ static ffelexHandler
ffeexpr_token_number_real_ (ffelexToken t) ffeexpr_token_number_real_ (ffelexToken t)
{ {
char d; char d;
char *p; const char *p;
if (((ffelex_token_type (t) != FFELEX_typeNAME) if (((ffelex_token_type (t) != FFELEX_typeNAME)
&& (ffelex_token_type (t) != FFELEX_typeNAMES)) && (ffelex_token_type (t) != FFELEX_typeNAMES))
......
...@@ -62,7 +62,7 @@ static FILE *out; ...@@ -62,7 +62,7 @@ static FILE *out;
static char prefix[32]; static char prefix[32];
static char postfix[32]; static char postfix[32];
static char storage[32]; static char storage[32];
static char *xspaces[] static const char *xspaces[]
= =
{ {
"", /* 0 */ "", /* 0 */
......
...@@ -60,7 +60,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -60,7 +60,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#if FFEGLOBAL_ENABLED #if FFEGLOBAL_ENABLED
static ffenameSpace ffeglobal_filewide_ = NULL; static ffenameSpace ffeglobal_filewide_ = NULL;
static char *ffeglobal_type_string_[] = static const char *ffeglobal_type_string_[] =
{ {
[FFEGLOBAL_typeNONE] "??", [FFEGLOBAL_typeNONE] "??",
[FFEGLOBAL_typeMAIN] "main program", [FFEGLOBAL_typeMAIN] "main program",
...@@ -86,7 +86,7 @@ static char *ffeglobal_type_string_[] = ...@@ -86,7 +86,7 @@ static char *ffeglobal_type_string_[] =
#if FFEGLOBAL_ENABLED #if FFEGLOBAL_ENABLED
void void
ffeglobal_drive (ffeglobal (*fn) ()) ffeglobal_drive (ffeglobal (*fn) (ffeglobal))
{ {
if (ffeglobal_filewide_ != NULL) if (ffeglobal_filewide_ != NULL)
ffename_space_drive_global (ffeglobal_filewide_, fn); ffename_space_drive_global (ffeglobal_filewide_, fn);
...@@ -514,7 +514,7 @@ ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl, ...@@ -514,7 +514,7 @@ ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
/* Collect info for a global's argument. */ /* Collect info for a global's argument. */
void void
ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as, ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as,
ffeinfoBasictype bt, ffeinfoKindtype kt, ffeinfoBasictype bt, ffeinfoKindtype kt,
bool array) bool array)
{ {
...@@ -538,8 +538,8 @@ ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary ...@@ -538,8 +538,8 @@ ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary
if ((ai->t != NULL) if ((ai->t != NULL)
&& ffe_is_warn_globals ()) && ffe_is_warn_globals ())
{ {
char *refwhy = NULL; const char *refwhy = NULL;
char *defwhy = NULL; const char *defwhy = NULL;
bool warn = FALSE; bool warn = FALSE;
switch (as) switch (as)
...@@ -816,8 +816,8 @@ ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as, ...@@ -816,8 +816,8 @@ ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as,
if (ai->t != NULL) if (ai->t != NULL)
{ {
char *refwhy = NULL; const char *refwhy = NULL;
char *defwhy = NULL; const char *defwhy = NULL;
bool fail = FALSE; bool fail = FALSE;
bool warn = FALSE; bool warn = FALSE;
......
...@@ -128,14 +128,14 @@ struct _ffeglobal_ ...@@ -128,14 +128,14 @@ struct _ffeglobal_
/* Declare functions with prototypes. */ /* Declare functions with prototypes. */
void ffeglobal_drive (ffeglobal (*fn) ()); void ffeglobal_drive (ffeglobal (*fn) (ffeglobal));
void ffeglobal_init_1 (void); void ffeglobal_init_1 (void);
void ffeglobal_init_common (ffesymbol s, ffelexToken t); void ffeglobal_init_common (ffesymbol s, ffelexToken t);
void ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type); void ffeglobal_new_progunit_ (ffesymbol s, ffelexToken t, ffeglobalType type);
void ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank); void ffeglobal_new_common (ffesymbol s, ffelexToken t, bool blank);
void ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl, void ffeglobal_pad_common (ffesymbol s, ffetargetAlign pad, ffewhereLine wl,
ffewhereColumn wc); ffewhereColumn wc);
void ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary as, void ffeglobal_proc_def_arg (ffesymbol s, int argno, const char *name, ffeglobalArgSummary as,
ffeinfoBasictype bt, ffeinfoKindtype kt, ffeinfoBasictype bt, ffeinfoKindtype kt,
bool array); bool array);
void ffeglobal_proc_def_nargs (ffesymbol s, int n_args); void ffeglobal_proc_def_nargs (ffesymbol s, int n_args);
......
...@@ -331,7 +331,7 @@ ffeimplic_none () ...@@ -331,7 +331,7 @@ ffeimplic_none ()
/* ffeimplic_peek_symbol_type -- Determine implicit type of a symbol /* ffeimplic_peek_symbol_type -- Determine implicit type of a symbol
ffesymbol s; ffesymbol s;
char *name; // name for s in case it is NULL, or NULL if s never NULL const char *name; // name for s in case it is NULL, or NULL if s never NULL
if (ffeimplic_peek_symbol_type(s,name) == FFEINFO_basictypeCHARACTER) if (ffeimplic_peek_symbol_type(s,name) == FFEINFO_basictypeCHARACTER)
// is or will be a CHARACTER-typed name // is or will be a CHARACTER-typed name
...@@ -348,7 +348,7 @@ ffeimplic_none () ...@@ -348,7 +348,7 @@ ffeimplic_none ()
needed anyway (as when ffecom calls it). */ needed anyway (as when ffecom calls it). */
ffeinfoBasictype ffeinfoBasictype
ffeimplic_peek_symbol_type (ffesymbol s, char *name) ffeimplic_peek_symbol_type (ffesymbol s, const char *name)
{ {
char c; char c;
ffeimplic_ imp; ffeimplic_ imp;
......
...@@ -55,7 +55,7 @@ bool ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type, ...@@ -55,7 +55,7 @@ bool ffeimplic_establish_initial (char c, ffeinfoBasictype basic_type,
bool ffeimplic_establish_symbol (ffesymbol s); bool ffeimplic_establish_symbol (ffesymbol s);
void ffeimplic_init_2 (void); void ffeimplic_init_2 (void);
void ffeimplic_none (void); void ffeimplic_none (void);
ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, char *name); ffeinfoBasictype ffeimplic_peek_symbol_type (ffesymbol s, const char *name);
void ffeimplic_terminate_2 (void); void ffeimplic_terminate_2 (void);
/* Define macros. */ /* Define macros. */
......
...@@ -55,21 +55,21 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -55,21 +55,21 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Static objects accessed by functions in this module. */ /* Static objects accessed by functions in this module. */
static char *ffeinfo_basictype_string_[] static const char *ffeinfo_basictype_string_[]
= =
{ {
#define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) SNAM, #define FFEINFO_BASICTYPE(KWD,LNAM,SNAM) SNAM,
#include "info-b.def" #include "info-b.def"
#undef FFEINFO_BASICTYPE #undef FFEINFO_BASICTYPE
}; };
static char *ffeinfo_kind_message_[] static const char *ffeinfo_kind_message_[]
= =
{ {
#define FFEINFO_KIND(KWD,LNAM,SNAM) LNAM, #define FFEINFO_KIND(KWD,LNAM,SNAM) LNAM,
#include "info-k.def" #include "info-k.def"
#undef FFEINFO_KIND #undef FFEINFO_KIND
}; };
static char *ffeinfo_kind_string_[] static const char *ffeinfo_kind_string_[]
= =
{ {
#define FFEINFO_KIND(KWD,LNAM,SNAM) SNAM, #define FFEINFO_KIND(KWD,LNAM,SNAM) SNAM,
...@@ -77,7 +77,7 @@ static char *ffeinfo_kind_string_[] ...@@ -77,7 +77,7 @@ static char *ffeinfo_kind_string_[]
#undef FFEINFO_KIND #undef FFEINFO_KIND
}; };
static ffeinfoBasictype ffeinfo_combine_[FFEINFO_basictype][FFEINFO_basictype]; static ffeinfoBasictype ffeinfo_combine_[FFEINFO_basictype][FFEINFO_basictype];
static char *ffeinfo_kindtype_string_[] static const char *ffeinfo_kindtype_string_[]
= =
{ {
"", "",
...@@ -91,7 +91,7 @@ static char *ffeinfo_kindtype_string_[] ...@@ -91,7 +91,7 @@ static char *ffeinfo_kindtype_string_[]
"8", "8",
"*", "*",
}; };
static char *ffeinfo_where_string_[] static const char *ffeinfo_where_string_[]
= =
{ {
#define FFEINFO_WHERE(KWD,LNAM,SNAM) SNAM, #define FFEINFO_WHERE(KWD,LNAM,SNAM) SNAM,
...@@ -129,7 +129,7 @@ ffeinfo_basictype_combine (ffeinfoBasictype l, ffeinfoBasictype r) ...@@ -129,7 +129,7 @@ ffeinfo_basictype_combine (ffeinfoBasictype l, ffeinfoBasictype r)
Returns the string based on the basic type. */ Returns the string based on the basic type. */
char * const char *
ffeinfo_basictype_string (ffeinfoBasictype basictype) ffeinfo_basictype_string (ffeinfoBasictype basictype)
{ {
if (basictype >= ARRAY_SIZE (ffeinfo_basictype_string_)) if (basictype >= ARRAY_SIZE (ffeinfo_basictype_string_))
...@@ -186,7 +186,7 @@ ffeinfo_init_0 () ...@@ -186,7 +186,7 @@ ffeinfo_init_0 ()
Returns the string based on the kind. */ Returns the string based on the kind. */
char * const char *
ffeinfo_kind_message (ffeinfoKind kind) ffeinfo_kind_message (ffeinfoKind kind)
{ {
if (kind >= ARRAY_SIZE (ffeinfo_kind_message_)) if (kind >= ARRAY_SIZE (ffeinfo_kind_message_))
...@@ -201,7 +201,7 @@ ffeinfo_kind_message (ffeinfoKind kind) ...@@ -201,7 +201,7 @@ ffeinfo_kind_message (ffeinfoKind kind)
Returns the string based on the kind. */ Returns the string based on the kind. */
char * const char *
ffeinfo_kind_string (ffeinfoKind kind) ffeinfo_kind_string (ffeinfoKind kind)
{ {
if (kind >= ARRAY_SIZE (ffeinfo_kind_string_)) if (kind >= ARRAY_SIZE (ffeinfo_kind_string_))
...@@ -232,7 +232,7 @@ ffeinfo_kindtype_max(ffeinfoBasictype bt, ...@@ -232,7 +232,7 @@ ffeinfo_kindtype_max(ffeinfoBasictype bt,
Returns the string based on the kind type. */ Returns the string based on the kind type. */
char * const char *
ffeinfo_kindtype_string (ffeinfoKindtype kind_type) ffeinfo_kindtype_string (ffeinfoKindtype kind_type)
{ {
if (kind_type >= ARRAY_SIZE (ffeinfo_kindtype_string_)) if (kind_type >= ARRAY_SIZE (ffeinfo_kindtype_string_))
...@@ -267,7 +267,7 @@ ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype) ...@@ -267,7 +267,7 @@ ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype)
Returns the string based on the where. */ Returns the string based on the where. */
char * const char *
ffeinfo_where_string (ffeinfoWhere where) ffeinfo_where_string (ffeinfoWhere where)
{ {
if (where >= ARRAY_SIZE (ffeinfo_where_string_)) if (where >= ARRAY_SIZE (ffeinfo_where_string_))
......
...@@ -127,15 +127,15 @@ struct _ffeinfo_ ...@@ -127,15 +127,15 @@ struct _ffeinfo_
ffeinfoBasictype ffeinfo_basictype_combine (ffeinfoBasictype l, ffeinfoBasictype ffeinfo_basictype_combine (ffeinfoBasictype l,
ffeinfoBasictype r); ffeinfoBasictype r);
char *ffeinfo_basictype_string (ffeinfoBasictype basictype); const char *ffeinfo_basictype_string (ffeinfoBasictype basictype);
void ffeinfo_init_0 (void); void ffeinfo_init_0 (void);
char *ffeinfo_kind_message (ffeinfoKind kind); const char *ffeinfo_kind_message (ffeinfoKind kind);
char *ffeinfo_kind_string (ffeinfoKind kind); const char *ffeinfo_kind_string (ffeinfoKind kind);
ffeinfoKindtype ffeinfo_kindtype_max(ffeinfoBasictype bt, ffeinfoKindtype ffeinfo_kindtype_max(ffeinfoBasictype bt,
ffeinfoKindtype k1, ffeinfoKindtype k1,
ffeinfoKindtype k2); ffeinfoKindtype k2);
char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type); const char *ffeinfo_kindtype_string (ffeinfoKindtype kind_type);
char *ffeinfo_where_string (ffeinfoWhere where); const char *ffeinfo_where_string (ffeinfoWhere where);
ffeinfo ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype, ffeinfo ffeinfo_new (ffeinfoBasictype basictype, ffeinfoKindtype kindtype,
ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where, ffeinfoRank rank, ffeinfoKind kind, ffeinfoWhere where,
ffetargetCharacterSize size); ffetargetCharacterSize size);
......
...@@ -32,22 +32,22 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -32,22 +32,22 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
struct _ffeintrin_name_ struct _ffeintrin_name_
{ {
char *name_uc; const char *name_uc;
char *name_lc; const char *name_lc;
char *name_ic; const char *name_ic;
ffeintrinGen generic; ffeintrinGen generic;
ffeintrinSpec specific; ffeintrinSpec specific;
}; };
struct _ffeintrin_gen_ struct _ffeintrin_gen_
{ {
char *name; /* Name as seen in program. */ const char *name; /* Name as seen in program. */
ffeintrinSpec specs[2]; ffeintrinSpec specs[2];
}; };
struct _ffeintrin_spec_ struct _ffeintrin_spec_
{ {
char *name; /* Uppercase name as seen in source code, const char *name; /* Uppercase name as seen in source code,
lowercase if no source name, "none" if no lowercase if no source name, "none" if no
name at all (NONE case). */ name at all (NONE case). */
bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */ bool is_actualarg; /* Ok to pass as actual arg if -pedantic. */
...@@ -57,13 +57,13 @@ struct _ffeintrin_spec_ ...@@ -57,13 +57,13 @@ struct _ffeintrin_spec_
struct _ffeintrin_imp_ struct _ffeintrin_imp_
{ {
char *name; /* Name of implementation. */ const char *name; /* Name of implementation. */
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
ffecomGfrt gfrt_direct; /* library routine, direct-callable form. */ ffecomGfrt gfrt_direct; /* library routine, direct-callable form. */
ffecomGfrt gfrt_f2c; /* library routine, f2c-callable form. */ ffecomGfrt gfrt_f2c; /* library routine, f2c-callable form. */
ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */ ffecomGfrt gfrt_gnu; /* library routine, gnu-callable form. */
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
char *control; const char *control;
char y2kbad; char y2kbad;
}; };
...@@ -166,9 +166,9 @@ ffeintrin_check_ (ffeintrinImp imp, ffebldOp op, ...@@ -166,9 +166,9 @@ ffeintrin_check_ (ffeintrinImp imp, ffebldOp op,
ffelexToken t, ffelexToken t,
bool commit) bool commit)
{ {
char *c = ffeintrin_imps_[imp].control; const char *c = ffeintrin_imps_[imp].control;
bool subr = (c[0] == '-'); bool subr = (c[0] == '-');
char *argc; const char *argc;
ffebld arg; ffebld arg;
ffeinfoBasictype bt; ffeinfoBasictype bt;
ffeinfoKindtype kt; ffeinfoKindtype kt;
...@@ -1165,9 +1165,9 @@ ffeintrin_check_any_ (ffebld arglist) ...@@ -1165,9 +1165,9 @@ ffeintrin_check_any_ (ffebld arglist)
static int static int
ffeintrin_cmp_name_ (const void *name, const void *intrinsic) ffeintrin_cmp_name_ (const void *name, const void *intrinsic)
{ {
char *uc = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_uc; const char *uc = ((struct _ffeintrin_name_ *) intrinsic)->name_uc;
char *lc = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_lc; const char *lc = ((struct _ffeintrin_name_ *) intrinsic)->name_lc;
char *ic = (char *) ((struct _ffeintrin_name_ *) intrinsic)->name_ic; const char *ic = ((struct _ffeintrin_name_ *) intrinsic)->name_ic;
return ffesrc_strcmp_2c (ffe_case_intrin (), name, uc, lc, ic); return ffesrc_strcmp_2c (ffe_case_intrin (), name, uc, lc, ic);
} }
...@@ -1429,7 +1429,7 @@ ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info, ...@@ -1429,7 +1429,7 @@ ffeintrin_fulfill_specific (ffebld *expr, ffeinfo *info,
ffeIntrinsicState state; ffeIntrinsicState state;
ffebad error; ffebad error;
bool any = FALSE; bool any = FALSE;
char *name; const char *name;
op = ffebld_op (*expr); op = ffebld_op (*expr);
assert ((op == FFEBLD_opFUNCREF) || (op == FFEBLD_opSUBRREF)); assert ((op == FFEBLD_opFUNCREF) || (op == FFEBLD_opSUBRREF));
...@@ -1551,9 +1551,9 @@ void ...@@ -1551,9 +1551,9 @@ void
ffeintrin_init_0 () ffeintrin_init_0 ()
{ {
int i; int i;
char *p1; const char *p1;
char *p2; const char *p2;
char *p3; const char *p3;
int colon; int colon;
if (!ffe_is_do_internal_checks ()) if (!ffe_is_do_internal_checks ())
...@@ -1597,7 +1597,7 @@ ffeintrin_init_0 () ...@@ -1597,7 +1597,7 @@ ffeintrin_init_0 ()
for (i = 0; ((size_t) i) < ARRAY_SIZE (ffeintrin_imps_); ++i) for (i = 0; ((size_t) i) < ARRAY_SIZE (ffeintrin_imps_); ++i)
{ {
char *c = ffeintrin_imps_[i].control; const char *c = ffeintrin_imps_[i].control;
if (c[0] == '\0') if (c[0] == '\0')
continue; continue;
...@@ -1775,7 +1775,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec) ...@@ -1775,7 +1775,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec)
/* Determine if name is intrinsic, return info. /* Determine if name is intrinsic, return info.
char *name; // C-string name of possible intrinsic. const char *name; // C-string name of possible intrinsic.
ffelexToken t; // NULL if no diagnostic to be given. ffelexToken t; // NULL if no diagnostic to be given.
bool explicit; // TRUE if INTRINSIC name. bool explicit; // TRUE if INTRINSIC name.
ffeintrinGen gen; // (TRUE only) Generic id of intrinsic. ffeintrinGen gen; // (TRUE only) Generic id of intrinsic.
...@@ -1787,7 +1787,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec) ...@@ -1787,7 +1787,7 @@ ffeintrin_is_actualarg (ffeintrinSpec spec)
// kind accordingly. */ // kind accordingly. */
bool bool
ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit, ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit,
ffeintrinGen *xgen, ffeintrinSpec *xspec, ffeintrinGen *xgen, ffeintrinSpec *xspec,
ffeintrinImp *ximp) ffeintrinImp *ximp)
{ {
...@@ -1998,7 +1998,7 @@ ffeintrin_kindtype (ffeintrinSpec spec) ...@@ -1998,7 +1998,7 @@ ffeintrin_kindtype (ffeintrinSpec spec)
/* Return name of generic intrinsic. */ /* Return name of generic intrinsic. */
char * const char *
ffeintrin_name_generic (ffeintrinGen gen) ffeintrin_name_generic (ffeintrinGen gen)
{ {
assert (gen < FFEINTRIN_gen); assert (gen < FFEINTRIN_gen);
...@@ -2007,7 +2007,7 @@ ffeintrin_name_generic (ffeintrinGen gen) ...@@ -2007,7 +2007,7 @@ ffeintrin_name_generic (ffeintrinGen gen)
/* Return name of intrinsic implementation. */ /* Return name of intrinsic implementation. */
char * const char *
ffeintrin_name_implementation (ffeintrinImp imp) ffeintrin_name_implementation (ffeintrinImp imp)
{ {
assert (imp < FFEINTRIN_imp); assert (imp < FFEINTRIN_imp);
...@@ -2016,7 +2016,7 @@ ffeintrin_name_implementation (ffeintrinImp imp) ...@@ -2016,7 +2016,7 @@ ffeintrin_name_implementation (ffeintrinImp imp)
/* Return external/internal name of specific intrinsic. */ /* Return external/internal name of specific intrinsic. */
char * const char *
ffeintrin_name_specific (ffeintrinSpec spec) ffeintrin_name_specific (ffeintrinSpec spec)
{ {
assert (spec < FFEINTRIN_spec); assert (spec < FFEINTRIN_spec);
......
...@@ -115,14 +115,14 @@ void ffeintrin_init_0 (void); ...@@ -115,14 +115,14 @@ void ffeintrin_init_0 (void);
#define ffeintrin_init_3() #define ffeintrin_init_3()
#define ffeintrin_init_4() #define ffeintrin_init_4()
bool ffeintrin_is_actualarg (ffeintrinSpec spec); bool ffeintrin_is_actualarg (ffeintrinSpec spec);
bool ffeintrin_is_intrinsic (char *name, ffelexToken t, bool explicit, bool ffeintrin_is_intrinsic (const char *name, ffelexToken t, bool explicit,
ffeintrinGen *gen, ffeintrinSpec *spec, ffeintrinGen *gen, ffeintrinSpec *spec,
ffeintrinImp *imp); ffeintrinImp *imp);
bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec); bool ffeintrin_is_standard (ffeintrinGen gen, ffeintrinSpec spec);
ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec); ffeinfoKindtype ffeintrin_kindtype (ffeintrinSpec spec);
char *ffeintrin_name_generic (ffeintrinGen gen); const char *ffeintrin_name_generic (ffeintrinGen gen);
char *ffeintrin_name_implementation (ffeintrinImp imp); const char *ffeintrin_name_implementation (ffeintrinImp imp);
char *ffeintrin_name_specific (ffeintrinSpec spec); const char *ffeintrin_name_specific (ffeintrinSpec spec);
ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family); ffeIntrinsicState ffeintrin_state_family (ffeintrinFamily family);
#define ffeintrin_terminate_0() #define ffeintrin_terminate_0()
#define ffeintrin_terminate_1() #define ffeintrin_terminate_1()
......
...@@ -1751,10 +1751,10 @@ ffelex_token_new_ () ...@@ -1751,10 +1751,10 @@ ffelex_token_new_ ()
return t; return t;
} }
static char * static const char *
ffelex_type_string_ (ffelexType type) ffelex_type_string_ (ffelexType type)
{ {
static char *types[] = { static const char *types[] = {
"FFELEX_typeNONE", "FFELEX_typeNONE",
"FFELEX_typeCOMMENT", "FFELEX_typeCOMMENT",
"FFELEX_typeEOS", "FFELEX_typeEOS",
...@@ -4546,7 +4546,7 @@ ffelex_token_names_from_names (ffelexToken t, ffeTokenLength start, ...@@ -4546,7 +4546,7 @@ ffelex_token_names_from_names (ffelexToken t, ffeTokenLength start,
/* Make a new CHARACTER token. */ /* Make a new CHARACTER token. */
ffelexToken ffelexToken
ffelex_token_new_character (char *s, ffewhereLine l, ffewhereColumn c) ffelex_token_new_character (const char *s, ffewhereLine l, ffewhereColumn c)
{ {
ffelexToken t; ffelexToken t;
...@@ -4581,7 +4581,7 @@ ffelex_token_new_eof () ...@@ -4581,7 +4581,7 @@ ffelex_token_new_eof ()
/* Make a new NAME token. */ /* Make a new NAME token. */
ffelexToken ffelexToken
ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c) ffelex_token_new_name (const char *s, ffewhereLine l, ffewhereColumn c)
{ {
ffelexToken t; ffelexToken t;
...@@ -4602,7 +4602,7 @@ ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c) ...@@ -4602,7 +4602,7 @@ ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c)
/* Make a new NAMES token. */ /* Make a new NAMES token. */
ffelexToken ffelexToken
ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c) ffelex_token_new_names (const char *s, ffewhereLine l, ffewhereColumn c)
{ {
ffelexToken t; ffelexToken t;
...@@ -4631,7 +4631,7 @@ ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c) ...@@ -4631,7 +4631,7 @@ ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c)
in the original string. */ in the original string. */
ffelexToken ffelexToken
ffelex_token_new_number (char *s, ffewhereLine l, ffewhereColumn c) ffelex_token_new_number (const char *s, ffewhereLine l, ffewhereColumn c)
{ {
ffelexToken t; ffelexToken t;
ffeTokenLength len; ffeTokenLength len;
......
...@@ -148,14 +148,14 @@ ffelexToken ffelex_token_names_from_names (ffelexToken t, ...@@ -148,14 +148,14 @@ ffelexToken ffelex_token_names_from_names (ffelexToken t,
ffeTokenLength start, ffeTokenLength start,
ffeTokenLength len); ffeTokenLength len);
ffelexToken ffelex_token_new (void); ffelexToken ffelex_token_new (void);
ffelexToken ffelex_token_new_character (char *s, ffewhereLine l, ffelexToken ffelex_token_new_character (const char *s, ffewhereLine l,
ffewhereColumn c); ffewhereColumn c);
ffelexToken ffelex_token_new_eof (void); ffelexToken ffelex_token_new_eof (void);
ffelexToken ffelex_token_new_name (char *s, ffewhereLine l, ffelexToken ffelex_token_new_name (const char *s, ffewhereLine l,
ffewhereColumn c); ffewhereColumn c);
ffelexToken ffelex_token_new_names (char *s, ffewhereLine l, ffelexToken ffelex_token_new_names (const char *s, ffewhereLine l,
ffewhereColumn c); ffewhereColumn c);
ffelexToken ffelex_token_new_number (char *s, ffewhereLine l, ffelexToken ffelex_token_new_number (const char *s, ffewhereLine l,
ffewhereColumn c); ffewhereColumn c);
ffelexToken ffelex_token_new_simple_ (ffelexType type, ffewhereLine l, ffelexToken ffelex_token_new_simple_ (ffelexType type, ffewhereLine l,
ffewhereColumn c); ffewhereColumn c);
......
...@@ -70,7 +70,7 @@ struct _malloc_root_ malloc_root_ ...@@ -70,7 +70,7 @@ struct _malloc_root_ malloc_root_
static void *malloc_reserve_ = NULL; /* For crashes. */ static void *malloc_reserve_ = NULL; /* For crashes. */
#if MALLOC_DEBUG #if MALLOC_DEBUG
static char *malloc_types_[] = static const char *malloc_types_[] =
{"KS", "KSR", "NF", "NFR", "US", "USR"}; {"KS", "KSR", "NF", "NFR", "US", "USR"};
#endif #endif
...@@ -234,7 +234,7 @@ malloc_pool_kill (mallocPool p) ...@@ -234,7 +234,7 @@ malloc_pool_kill (mallocPool p)
Makes a new pool with the given name and default new-chunk allocation. */ Makes a new pool with the given name and default new-chunk allocation. */
mallocPool mallocPool
malloc_pool_new (char *name, mallocPool parent, malloc_pool_new (const char *name, mallocPool parent,
unsigned long chunks UNUSED) unsigned long chunks UNUSED)
{ {
mallocPool p; mallocPool p;
...@@ -384,7 +384,7 @@ malloc_new_ (mallocSize s) ...@@ -384,7 +384,7 @@ malloc_new_ (mallocSize s)
add it to the list of mallocArea_s for the pool. */ add it to the list of mallocArea_s for the pool. */
void * void *
malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s) malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s)
{ {
void *ptr; void *ptr;
mallocArea_ a; mallocArea_ a;
...@@ -437,7 +437,7 @@ malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s) ...@@ -437,7 +437,7 @@ malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s)
you pass it a 0). */ you pass it a 0). */
void * void *
malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name, mallocSize s, malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name, mallocSize s,
int z) int z)
{ {
void *ptr; void *ptr;
......
...@@ -109,14 +109,14 @@ void malloc_init (void); ...@@ -109,14 +109,14 @@ void malloc_init (void);
void malloc_kill_inpool_ (mallocPool pool, mallocType_ type, void *ptr, void malloc_kill_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
mallocSize size); mallocSize size);
void *malloc_new_ (mallocSize size); void *malloc_new_ (mallocSize size);
void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, char *name, void *malloc_new_inpool_ (mallocPool pool, mallocType_ type, const char *name,
mallocSize size); mallocSize size);
void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, char *name, void *malloc_new_zinpool_ (mallocPool pool, mallocType_ type, const char *name,
mallocSize size, int z); mallocSize size, int z);
void malloc_pool_display (mallocPool p); void malloc_pool_display (mallocPool p);
char malloc_pool_find_ (mallocPool p, mallocPool parent); char malloc_pool_find_ (mallocPool p, mallocPool parent);
void malloc_pool_kill (mallocPool p); void malloc_pool_kill (mallocPool p);
mallocPool malloc_pool_new (char *name, mallocPool parent, unsigned long chunks); mallocPool malloc_pool_new (const char *name, mallocPool parent, unsigned long chunks);
mallocPool malloc_pool_use (mallocPool p); mallocPool malloc_pool_use (mallocPool p);
void *malloc_resize_ (void *ptr, mallocSize new_size); void *malloc_resize_ (void *ptr, mallocSize new_size);
void *malloc_resize_inpool_ (mallocPool pool, mallocType_ type, void *ptr, void *malloc_resize_inpool_ (mallocPool pool, mallocType_ type, void *ptr,
......
...@@ -167,7 +167,7 @@ ffename_lookup (ffenameSpace ns, ffelexToken t) ...@@ -167,7 +167,7 @@ ffename_lookup (ffenameSpace ns, ffelexToken t)
ffename_space_drive_global(ns,fn); */ ffename_space_drive_global(ns,fn); */
void void
ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ()) ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal))
{ {
ffename n; ffename n;
...@@ -188,7 +188,7 @@ ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ()) ...@@ -188,7 +188,7 @@ ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ())
ffename_space_drive_symbol(ns,fn); */ ffename_space_drive_symbol(ns,fn); */
void void
ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ()) ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol))
{ {
ffename n; ffename n;
......
...@@ -75,8 +75,8 @@ struct _ffename_space_ ...@@ -75,8 +75,8 @@ struct _ffename_space_
ffename ffename_find (ffenameSpace ns, ffelexToken t); ffename ffename_find (ffenameSpace ns, ffelexToken t);
void ffename_kill (ffenameSpace ns, ffename n); void ffename_kill (ffenameSpace ns, ffename n);
ffename ffename_lookup (ffenameSpace ns, ffelexToken t); ffename ffename_lookup (ffenameSpace ns, ffelexToken t);
void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) ()); void ffename_space_drive_global (ffenameSpace ns, ffeglobal (*fn) (ffeglobal));
void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) ()); void ffename_space_drive_symbol (ffenameSpace ns, ffesymbol (*fn) (ffesymbol));
void ffename_space_kill (ffenameSpace ns); void ffename_space_kill (ffenameSpace ns);
ffenameSpace ffename_space_new (mallocPool pool); ffenameSpace ffename_space_new (mallocPool pool);
......
...@@ -117,7 +117,7 @@ static ffesymbolRetract_ *ffesymbol_retract_list_; ...@@ -117,7 +117,7 @@ static ffesymbolRetract_ *ffesymbol_retract_list_;
/* List of state names. */ /* List of state names. */
static char *ffesymbol_state_name_[] = static const char *ffesymbol_state_name_[] =
{ {
"?", "?",
"@", "@",
...@@ -127,7 +127,7 @@ static char *ffesymbol_state_name_[] = ...@@ -127,7 +127,7 @@ static char *ffesymbol_state_name_[] =
/* List of attribute names. */ /* List of attribute names. */
static char *ffesymbol_attr_name_[] = static const char *ffesymbol_attr_name_[] =
{ {
#define DEFATTR(ATTR,ATTRS,NAME) NAME, #define DEFATTR(ATTR,ATTRS,NAME) NAME,
#include "symbol.def" #include "symbol.def"
...@@ -316,7 +316,7 @@ ffesymbol_whine_state_ (ffebad bad, ffelexToken t, char c) ...@@ -316,7 +316,7 @@ ffesymbol_whine_state_ (ffebad bad, ffelexToken t, char c)
/* Returns a string representing the attributes set. */ /* Returns a string representing the attributes set. */
char * const char *
ffesymbol_attrs_string (ffesymbolAttrs attrs) ffesymbol_attrs_string (ffesymbolAttrs attrs)
{ {
static char string[FFESYMBOL_attr * 12 + 20]; static char string[FFESYMBOL_attr * 12 + 20];
...@@ -773,7 +773,7 @@ ffesymbol_declare_subrunit (ffelexToken t) ...@@ -773,7 +773,7 @@ ffesymbol_declare_subrunit (ffelexToken t)
ffesymbol_drive (fn); */ ffesymbol_drive (fn); */
void void
ffesymbol_drive (ffesymbol (*fn) ()) ffesymbol_drive (ffesymbol (*fn) (ffesymbol))
{ {
assert (ffesymbol_sfunc_ == NULL); /* Might be ok, but not for current assert (ffesymbol_sfunc_ == NULL); /* Might be ok, but not for current
uses. */ uses. */
...@@ -787,7 +787,7 @@ ffesymbol_drive (ffesymbol (*fn) ()) ...@@ -787,7 +787,7 @@ ffesymbol_drive (ffesymbol (*fn) ())
ffesymbol_drive_sfnames (fn); */ ffesymbol_drive_sfnames (fn); */
void void
ffesymbol_drive_sfnames (ffesymbol (*fn) ()) ffesymbol_drive_sfnames (ffesymbol (*fn) (ffesymbol))
{ {
ffename_space_drive_symbol (ffesymbol_sfunc_, fn); ffename_space_drive_symbol (ffesymbol_sfunc_, fn);
} }
...@@ -1348,7 +1348,7 @@ ffesymbol_signal_change (ffesymbol s) ...@@ -1348,7 +1348,7 @@ ffesymbol_signal_change (ffesymbol s)
/* Returns the string based on the state. */ /* Returns the string based on the state. */
char * const char *
ffesymbol_state_string (ffesymbolState state) ffesymbol_state_string (ffesymbolState state)
{ {
if (state >= ARRAY_SIZE (ffesymbol_state_name_)) if (state >= ARRAY_SIZE (ffesymbol_state_name_))
......
...@@ -158,7 +158,7 @@ struct _ffesymbol_ ...@@ -158,7 +158,7 @@ struct _ffesymbol_
#define ffesymbol_arraysize(s) ((s)->array_size) #define ffesymbol_arraysize(s) ((s)->array_size)
#define ffesymbol_attr(s,a) ((s)->attrs & ((ffesymbolAttrs) 1 << (a))) #define ffesymbol_attr(s,a) ((s)->attrs & ((ffesymbolAttrs) 1 << (a)))
#define ffesymbol_attrs(s) ((s)->attrs) #define ffesymbol_attrs(s) ((s)->attrs)
char *ffesymbol_attrs_string (ffesymbolAttrs attrs); const char *ffesymbol_attrs_string (ffesymbolAttrs attrs);
#define ffesymbol_basictype(s) ffeinfo_basictype((s)->info) #define ffesymbol_basictype(s) ffeinfo_basictype((s)->info)
void ffesymbol_check (ffesymbol s, ffelexToken t, bool maybe_intrin); void ffesymbol_check (ffesymbol s, ffelexToken t, bool maybe_intrin);
#define ffesymbol_common(s) ((s)->common) #define ffesymbol_common(s) ((s)->common)
...@@ -177,8 +177,8 @@ ffesymbol ffesymbol_declare_sfdummy (ffelexToken t); ...@@ -177,8 +177,8 @@ ffesymbol ffesymbol_declare_sfdummy (ffelexToken t);
ffesymbol ffesymbol_declare_subrunit (ffelexToken t); ffesymbol ffesymbol_declare_subrunit (ffelexToken t);
#define ffesymbol_dims(s) ((s)->dims) #define ffesymbol_dims(s) ((s)->dims)
#define ffesymbol_dim_syms(s) ((s)->dim_syms) #define ffesymbol_dim_syms(s) ((s)->dim_syms)
void ffesymbol_drive (ffesymbol (*fn) ()); void ffesymbol_drive (ffesymbol (*fn) (ffesymbol));
void ffesymbol_drive_sfnames (ffesymbol (*fn) ()); void ffesymbol_drive_sfnames (ffesymbol (*fn) (ffesymbol));
#define ffesymbol_dummyargs(s) ((s)->dummy_args) #define ffesymbol_dummyargs(s) ((s)->dummy_args)
#if FFECOM_targetCURRENT == FFECOM_targetFFE #if FFECOM_targetCURRENT == FFECOM_targetFFE
void ffesymbol_dump (ffesymbol s); void ffesymbol_dump (ffesymbol s);
...@@ -269,7 +269,7 @@ void ffesymbol_signal_change (ffesymbol s); ...@@ -269,7 +269,7 @@ void ffesymbol_signal_change (ffesymbol s);
#define ffesymbol_specific(s) ((s)->specific) #define ffesymbol_specific(s) ((s)->specific)
#define ffesymbol_state(s) ((s)->state) #define ffesymbol_state(s) ((s)->state)
#define ffesymbol_state_is_specable(s) ((s) <= FFESYMBOL_stateSEEN) #define ffesymbol_state_is_specable(s) ((s) <= FFESYMBOL_stateSEEN)
char *ffesymbol_state_string (ffesymbolState state); const char *ffesymbol_state_string (ffesymbolState state);
#define ffesymbol_storage(s) ((s)->storage) #define ffesymbol_storage(s) ((s)->storage)
void ffesymbol_terminate_0 (void); void ffesymbol_terminate_0 (void);
void ffesymbol_terminate_1 (void); void ffesymbol_terminate_1 (void);
......
...@@ -469,7 +469,7 @@ ffetarget_iszero_hollerith (ffetargetHollerith constant) ...@@ -469,7 +469,7 @@ ffetarget_iszero_hollerith (ffetargetHollerith constant)
data type info and the number of elements an array (1 for a scalar). */ data type info and the number of elements an array (1 for a scalar). */
void void
ffetarget_layout (char *error_text UNUSED, ffetargetAlign *alignment, ffetarget_layout (const char *error_text UNUSED, ffetargetAlign *alignment,
ffetargetAlign *modulo, ffetargetOffset *size, ffetargetAlign *modulo, ffetargetOffset *size,
ffeinfoBasictype bt, ffeinfoKindtype kt, ffeinfoBasictype bt, ffeinfoKindtype kt,
ffetargetCharacterSize charsize, ffetargetCharacterSize charsize,
......
...@@ -732,7 +732,7 @@ void ffetarget_integer_bad_magical_precedence_binary (ffelexToken integer, ...@@ -732,7 +732,7 @@ void ffetarget_integer_bad_magical_precedence_binary (ffelexToken integer,
bool ffetarget_iszero_character1 (ffetargetCharacter1 constant); bool ffetarget_iszero_character1 (ffetargetCharacter1 constant);
#endif #endif
bool ffetarget_iszero_hollerith (ffetargetHollerith constant); bool ffetarget_iszero_hollerith (ffetargetHollerith constant);
void ffetarget_layout (char *error_text, ffetargetAlign *alignment, void ffetarget_layout (const char *error_text, ffetargetAlign *alignment,
ffetargetAlign *modulo, ffetargetOffset *size, ffetargetAlign *modulo, ffetargetOffset *size,
ffeinfoBasictype bt, ffeinfoKindtype kt, ffeinfoBasictype bt, ffeinfoKindtype kt,
ffetargetCharacterSize charsize, ffetargetCharacterSize charsize,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment