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);
......
...@@ -403,7 +403,7 @@ struct _ffecom_temp_ ...@@ -403,7 +403,7 @@ struct _ffecom_temp_
/* Static functions (internal). */ /* Static functions (internal). */
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree ffecom_arglist_expr_ (char *argstring, ffebld args); static tree ffecom_arglist_expr_ (const char *argstring, ffebld args);
static tree ffecom_widest_expr_type_ (ffebld list); static tree ffecom_widest_expr_type_ (ffebld list);
static bool ffecom_overlap_ (tree dest_decl, tree dest_offset, static bool ffecom_overlap_ (tree dest_decl, tree dest_offset,
tree dest_size, tree source_tree, tree dest_size, tree source_tree,
...@@ -411,7 +411,7 @@ static bool ffecom_overlap_ (tree dest_decl, tree dest_offset, ...@@ -411,7 +411,7 @@ static bool ffecom_overlap_ (tree dest_decl, tree dest_offset,
static bool ffecom_args_overlapping_ (tree dest_tree, ffebld dest, static bool ffecom_args_overlapping_ (tree dest_tree, ffebld dest,
tree args, tree callee_commons, tree args, tree callee_commons,
bool scalar_args); bool scalar_args);
static tree ffecom_build_f2c_string_ (int i, char *s); static tree ffecom_build_f2c_string_ (int i, const char *s);
static tree ffecom_call_ (tree fn, ffeinfoKindtype kt, static tree ffecom_call_ (tree fn, ffeinfoKindtype kt,
bool is_f2c_complex, tree type, bool is_f2c_complex, tree type,
tree args, tree dest_tree, tree args, tree dest_tree,
...@@ -434,8 +434,9 @@ static ffecomConcatList_ ...@@ -434,8 +434,9 @@ static ffecomConcatList_
static void ffecom_concat_list_kill_ (ffecomConcatList_ catlist); static void ffecom_concat_list_kill_ (ffecomConcatList_ catlist);
static ffecomConcatList_ ffecom_concat_list_new_ (ffebld expr, static ffecomConcatList_ ffecom_concat_list_new_ (ffebld expr,
ffetargetCharacterSize max); ffetargetCharacterSize max);
static void ffecom_debug_kludge_ (tree aggr, char *aggr_type, ffesymbol member, static void ffecom_debug_kludge_ (tree aggr, const char *aggr_type,
tree member_type, ffetargetOffset offset); ffesymbol member, tree member_type,
ffetargetOffset offset);
static void ffecom_do_entry_ (ffesymbol fn, int entrynum); static void ffecom_do_entry_ (ffesymbol fn, int entrynum);
static tree ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest, static tree ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest,
bool *dest_used, bool assignp, bool widenp); bool *dest_used, bool assignp, bool widenp);
...@@ -443,18 +444,18 @@ static tree ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree, ...@@ -443,18 +444,18 @@ static tree ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
ffebld dest, bool *dest_used); ffebld dest, bool *dest_used);
static tree ffecom_expr_power_integer_ (ffebld left, ffebld right); static tree ffecom_expr_power_integer_ (ffebld left, ffebld right);
static void ffecom_expr_transform_ (ffebld expr); static void ffecom_expr_transform_ (ffebld expr);
static void ffecom_f2c_make_type_ (tree *type, int tcode, char *name); static void ffecom_f2c_make_type_ (tree *type, int tcode, const char *name);
static void ffecom_f2c_set_lio_code_ (ffeinfoBasictype bt, int size, static void ffecom_f2c_set_lio_code_ (ffeinfoBasictype bt, int size,
int code); int code);
static ffeglobal ffecom_finish_global_ (ffeglobal global); static ffeglobal ffecom_finish_global_ (ffeglobal global);
static ffesymbol ffecom_finish_symbol_transform_ (ffesymbol s); static ffesymbol ffecom_finish_symbol_transform_ (ffesymbol s);
static tree ffecom_get_appended_identifier_ (char us, char *text); static tree ffecom_get_appended_identifier_ (char us, const char *text);
static tree ffecom_get_external_identifier_ (ffesymbol s); static tree ffecom_get_external_identifier_ (ffesymbol s);
static tree ffecom_get_identifier_ (char *text); static tree ffecom_get_identifier_ (const char *text);
static tree ffecom_gen_sfuncdef_ (ffesymbol s, static tree ffecom_gen_sfuncdef_ (ffesymbol s,
ffeinfoBasictype bt, ffeinfoBasictype bt,
ffeinfoKindtype kt); ffeinfoKindtype kt);
static char *ffecom_gfrt_args_ (ffecomGfrt ix); static const char *ffecom_gfrt_args_ (ffecomGfrt ix);
static tree ffecom_gfrt_tree_ (ffecomGfrt ix); static tree ffecom_gfrt_tree_ (ffecomGfrt ix);
static tree ffecom_init_zero_ (tree decl); static tree ffecom_init_zero_ (tree decl);
static tree ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg, static tree ffecom_intrinsic_ichar_ (tree tree_type, ffebld arg,
...@@ -495,6 +496,8 @@ static tree ffecom_type_vardesc_ (void); ...@@ -495,6 +496,8 @@ static tree ffecom_type_vardesc_ (void);
static tree ffecom_vardesc_ (ffebld expr); static tree ffecom_vardesc_ (ffebld expr);
static tree ffecom_vardesc_array_ (ffesymbol s); static tree ffecom_vardesc_array_ (ffesymbol s);
static tree ffecom_vardesc_dims_ (ffesymbol s); static tree ffecom_vardesc_dims_ (ffesymbol s);
static tree ffecom_convert_narrow_ (tree type, tree expr);
static tree ffecom_convert_widen_ (tree type, tree expr);
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */ #endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
/* These are static functions that parallel those found in the C front /* These are static functions that parallel those found in the C front
...@@ -503,9 +506,9 @@ static tree ffecom_vardesc_dims_ (ffesymbol s); ...@@ -503,9 +506,9 @@ static tree ffecom_vardesc_dims_ (ffesymbol s);
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static void bison_rule_compstmt_ (void); static void bison_rule_compstmt_ (void);
static void bison_rule_pushlevel_ (void); static void bison_rule_pushlevel_ (void);
static tree builtin_function (char *name, tree type, static tree builtin_function (const char *name, tree type,
enum built_in_function function_code, enum built_in_function function_code,
char *library_name); const char *library_name);
static int duplicate_decls (tree newdecl, tree olddecl); static int duplicate_decls (tree newdecl, tree olddecl);
static void finish_decl (tree decl, tree init, bool is_top_level); static void finish_decl (tree decl, tree init, bool is_top_level);
static void finish_function (int nested); static void finish_function (int nested);
...@@ -577,7 +580,7 @@ static tree ffecom_gfrt_[FFECOM_gfrt] ...@@ -577,7 +580,7 @@ static tree ffecom_gfrt_[FFECOM_gfrt]
/* Holds the external names of the functions. */ /* Holds the external names of the functions. */
static char *ffecom_gfrt_name_[FFECOM_gfrt] static const char *ffecom_gfrt_name_[FFECOM_gfrt]
= =
{ {
#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) NAME, #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) NAME,
...@@ -617,7 +620,7 @@ static ffecomRttype_ ffecom_gfrt_type_[FFECOM_gfrt] ...@@ -617,7 +620,7 @@ static ffecomRttype_ ffecom_gfrt_type_[FFECOM_gfrt]
/* String of codes for the function's arguments. */ /* String of codes for the function's arguments. */
static char *ffecom_gfrt_argstring_[FFECOM_gfrt] static const char *ffecom_gfrt_argstring_[FFECOM_gfrt]
= =
{ {
#define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) ARGS, #define DEFGFRT(CODE,NAME,TYPE,ARGS,VOLATILE,COMPLEX) ARGS,
...@@ -1097,7 +1100,7 @@ ffecom_build_complex_constant_ (tree type, tree realpart, tree imagpart) ...@@ -1097,7 +1100,7 @@ ffecom_build_complex_constant_ (tree type, tree realpart, tree imagpart)
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree static tree
ffecom_arglist_expr_ (char *c, ffebld expr) ffecom_arglist_expr_ (const char *c, ffebld expr)
{ {
tree list; tree list;
tree *plist = &list; tree *plist = &list;
...@@ -1519,14 +1522,14 @@ ffecom_args_overlapping_ (tree dest_tree, ffebld dest UNUSED, ...@@ -1519,14 +1522,14 @@ ffecom_args_overlapping_ (tree dest_tree, ffebld dest UNUSED,
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree static tree
ffecom_build_f2c_string_ (int i, char *s) ffecom_build_f2c_string_ (int i, const char *s)
{ {
if (!ffe_is_f2c_library ()) if (!ffe_is_f2c_library ())
return build_string (i, s); return build_string (i, s);
{ {
char *tmp; char *tmp;
char *p; const char *p;
char *q; char *q;
char space[34]; char space[34];
tree t; tree t;
...@@ -2268,7 +2271,7 @@ ffecom_concat_list_new_ (ffebld expr, ffetargetCharacterSize max) ...@@ -2268,7 +2271,7 @@ ffecom_concat_list_new_ (ffebld expr, ffetargetCharacterSize max)
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static void static void
ffecom_debug_kludge_ (tree aggr, char *aggr_type, ffesymbol member, ffecom_debug_kludge_ (tree aggr, const char *aggr_type, ffesymbol member,
tree member_type UNUSED, ffetargetOffset offset) tree member_type UNUSED, ffetargetOffset offset)
{ {
tree value; tree value;
...@@ -6562,7 +6565,7 @@ tail_recurse: /* :::::::::::::::::::: */ ...@@ -6562,7 +6565,7 @@ tail_recurse: /* :::::::::::::::::::: */
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static void static void
ffecom_f2c_make_type_ (tree *type, int tcode, char *name) ffecom_f2c_make_type_ (tree *type, int tcode, const char *name)
{ {
switch (tcode) switch (tcode)
{ {
...@@ -6762,7 +6765,7 @@ ffecom_finish_symbol_transform_ (ffesymbol s) ...@@ -6762,7 +6765,7 @@ ffecom_finish_symbol_transform_ (ffesymbol s)
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree static tree
ffecom_get_appended_identifier_ (char us, char *name) ffecom_get_appended_identifier_ (char us, const char *name)
{ {
int i; int i;
char *newname; char *newname;
...@@ -6791,7 +6794,7 @@ static tree ...@@ -6791,7 +6794,7 @@ static tree
ffecom_get_external_identifier_ (ffesymbol s) ffecom_get_external_identifier_ (ffesymbol s)
{ {
char us; char us;
char *name = ffesymbol_text (s); const char *name = ffesymbol_text (s);
/* If name is a built-in name, just return it as is. */ /* If name is a built-in name, just return it as is. */
...@@ -6830,7 +6833,7 @@ ffecom_get_external_identifier_ (ffesymbol s) ...@@ -6830,7 +6833,7 @@ ffecom_get_external_identifier_ (ffesymbol s)
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static tree static tree
ffecom_get_identifier_ (char *name) ffecom_get_identifier_ (const char *name)
{ {
/* If name does not contain an underscore, just return it as is. */ /* If name does not contain an underscore, just return it as is. */
...@@ -6991,7 +6994,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt) ...@@ -6991,7 +6994,7 @@ ffecom_gen_sfuncdef_ (ffesymbol s, ffeinfoBasictype bt, ffeinfoKindtype kt)
#endif #endif
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
static char * static const char *
ffecom_gfrt_args_ (ffecomGfrt ix) ffecom_gfrt_args_ (ffecomGfrt ix)
{ {
return ffecom_gfrt_argstring_[ix]; return ffecom_gfrt_argstring_[ix];
...@@ -11478,7 +11481,7 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt, ...@@ -11478,7 +11481,7 @@ ffecom_constantunion (ffebldConstantUnion *cu, ffeinfoBasictype bt,
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
tree tree
ffecom_decl_field (tree context, tree prevfield, ffecom_decl_field (tree context, tree prevfield,
char *name, tree type) const char *name, tree type)
{ {
tree field; tree field;
...@@ -11788,7 +11791,7 @@ ffecom_finish_progunit () ...@@ -11788,7 +11791,7 @@ ffecom_finish_progunit ()
#if FFECOM_targetCURRENT == FFECOM_targetGCC #if FFECOM_targetCURRENT == FFECOM_targetGCC
tree tree
ffecom_get_invented_identifier (char *pattern, char *text, int number) ffecom_get_invented_identifier (const char *pattern, const char *text, int number)
{ {
tree decl; tree decl;
char *nam; char *nam;
...@@ -13813,8 +13816,9 @@ bison_rule_pushlevel_ () ...@@ -13813,8 +13816,9 @@ bison_rule_pushlevel_ ()
the name to be called if we can't opencode the function. */ the name to be called if we can't opencode the function. */
static tree static tree
builtin_function (char *name, tree type, builtin_function (const char *name, tree type,
enum built_in_function function_code, char *library_name) enum built_in_function function_code,
const char *library_name)
{ {
tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type); tree decl = build_decl (FUNCTION_DECL, get_identifier (name), type);
DECL_EXTERNAL (decl) = 1; DECL_EXTERNAL (decl) = 1;
...@@ -14418,7 +14422,7 @@ lang_print_error_function (file) ...@@ -14418,7 +14422,7 @@ lang_print_error_function (file)
static ffesymbol last_s = NULL; static ffesymbol last_s = NULL;
ffeglobal g; ffeglobal g;
ffesymbol s; ffesymbol s;
char *kind; const char *kind;
if ((ffecom_primary_entry_ == NULL) if ((ffecom_primary_entry_ == NULL)
|| (ffesymbol_global (ffecom_primary_entry_) == NULL)) || (ffesymbol_global (ffecom_primary_entry_) == NULL))
...@@ -14472,7 +14476,7 @@ lang_print_error_function (file) ...@@ -14472,7 +14476,7 @@ lang_print_error_function (file)
fprintf (stderr, "Outside of any program unit:\n"); fprintf (stderr, "Outside of any program unit:\n");
else else
{ {
char *name = ffesymbol_text (s); const char *name = ffesymbol_text (s);
fprintf (stderr, "In %s `%s':\n", kind, name); fprintf (stderr, "In %s `%s':\n", kind, name);
} }
...@@ -15824,8 +15828,8 @@ unsigned_type (type) ...@@ -15824,8 +15828,8 @@ unsigned_type (type)
/* Skip leading "./" from a directory name. /* Skip leading "./" from a directory name.
This may yield the empty string, which represents the current directory. */ This may yield the empty string, which represents the current directory. */
static char * static const char *
skip_redundant_dir_prefix (char *dir) skip_redundant_dir_prefix (const char *dir)
{ {
while (dir[0] == '.' && dir[1] == '/') while (dir[0] == '.' && dir[1] == '/')
for (dir += 2; *dir == '/'; dir++) for (dir += 2; *dir == '/'; dir++)
...@@ -15923,10 +15927,9 @@ static void append_include_chain (struct file_name_list *first, ...@@ -15923,10 +15927,9 @@ static void append_include_chain (struct file_name_list *first,
static FILE *open_include_file (char *filename, static FILE *open_include_file (char *filename,
struct file_name_list *searchptr); struct file_name_list *searchptr);
static void print_containing_files (ffebadSeverity sev); static void print_containing_files (ffebadSeverity sev);
static char *skip_redundant_dir_prefix (char *); static const char *skip_redundant_dir_prefix (const char *);
static char *read_filename_string (int ch, FILE *f); static char *read_filename_string (int ch, FILE *f);
static struct file_name_map *read_name_map (char *dirname); static struct file_name_map *read_name_map (const char *dirname);
static char *savestring (char *input);
/* Append a chain of `struct file_name_list's /* Append a chain of `struct file_name_list's
to the end of the main include chain. to the end of the main include chain.
...@@ -16048,8 +16051,8 @@ print_containing_files (ffebadSeverity sev) ...@@ -16048,8 +16051,8 @@ print_containing_files (ffebadSeverity sev)
FILE_BUF *ip = NULL; FILE_BUF *ip = NULL;
int i; int i;
int first = 1; int first = 1;
char *str1; const char *str1;
char *str2; const char *str2;
/* If stack of files hasn't changed since we last printed /* If stack of files hasn't changed since we last printed
this info, don't repeat it. */ this info, don't repeat it. */
...@@ -16134,7 +16137,7 @@ read_filename_string (ch, f) ...@@ -16134,7 +16137,7 @@ read_filename_string (ch, f)
static struct file_name_map * static struct file_name_map *
read_name_map (dirname) read_name_map (dirname)
char *dirname; const char *dirname;
{ {
/* This structure holds a linked list of file name maps, one per /* This structure holds a linked list of file name maps, one per
directory. */ directory. */
...@@ -16160,7 +16163,7 @@ read_name_map (dirname) ...@@ -16160,7 +16163,7 @@ read_name_map (dirname)
map_list_ptr = ((struct file_name_map_list *) map_list_ptr = ((struct file_name_map_list *)
xmalloc (sizeof (struct file_name_map_list))); xmalloc (sizeof (struct file_name_map_list)));
map_list_ptr->map_list_name = savestring (dirname); map_list_ptr->map_list_name = xstrdup (dirname);
map_list_ptr->map_list_map = NULL; map_list_ptr->map_list_map = NULL;
dirlen = strlen (dirname); dirlen = strlen (dirname);
...@@ -16221,16 +16224,6 @@ read_name_map (dirname) ...@@ -16221,16 +16224,6 @@ read_name_map (dirname)
return map_list_ptr->map_list_map; return map_list_ptr->map_list_map;
} }
static char *
savestring (input)
char *input;
{
unsigned size = strlen (input);
char *output = xmalloc (size + 1);
strcpy (output, input);
return output;
}
static void static void
ffecom_file_ (char *name) ffecom_file_ (char *name)
{ {
......
...@@ -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